Part Number Hot Search : 
0ZA1T OMAP1 DDC144TU 0ZA1T MAX5631 1N3288A BUZ70 MC33501
Product Description
Full Text Search
 

To Download STA381BW Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  this is information on a product in full production. august 2012 doc id 018835 rev 7 1/171 1 STA381BW sound terminal ? 2.1-channel high-effici ency digital audio system datasheet ? production data features wide-range supply voltage ? 4.5 v to 26 v (operating range) ? 30 v (absolute maximum rating) i 2 c control with selectable device address embedded full ic protection ? manufacturing short-circuit protection (out vs. gnd, out vs. vcc, out vs. out) ? thermal protection ? overcurrent protection ? undervoltage protection 1 vrms stereo analog input i 2 s interface, sampling rate 32 khz ~ 192 khz, with internal sampling frequency converter for fixed processing frequency three output power stage configurations ? 2.0 mode, l/r full bridges ? 2.1 mode, l/r two half-bridges, subwoofer full bridge ? 2.1 mode, l/r full bridges, pwm output for external subwoofer amplifier driving load capabilities ? 2 x 20 w into 8 ternary modulation ? 2 x 9 w into 4 + 1 x 20 w into 8 ffx tm 100 db dynamic range fixed output pwm frequency at any input sampling frequency embedded rms meter for measuring real-time loudness two analog outputs ? selectable headphone / line out driver with adjustable gain via external resistors ?new f3x tm analog output new fully programmable noise-gating function headphone ? embedded negative charge pump ? full capless output configuration ? driving load capabilities: 40 mw into 32 line out ? 2 vrms line output capability up to 12 user-programmable biquads with noise-shaping technology direct access to coefficients through i 2 c shadowing mechanism fixed (88.2 khz / 96 khz) internal processing sampling rate two independent drcs configurable as a dual-band anticlipper or independent limiters/compressors (b 2 drc) digital gain/att +48 db to -80 db with 0.125 db/step resolution independent (fade-in, fade-out) soft volume update with programmable rate 48 ~ 1.5 db/ms bass/treble tones control audio presets: 15 crossover filters, 5 anticlipping modes, nighttime listening mode stspeakersafe tm protection circuitry ?pre - and post - processing dc blocking filters ? checksum engine for filter coefficients ? pwm fault self-diagnosis stcompressor tm dual-band drc table 1. device summary order code package packing STA381BW vqfn48 tray STA381BWtr vqfn48 tape and reel vqfn48 (7 x 7 mm) www.st.com
contents STA381BW 2/171 doc id 018835 rev 7 contents 1 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.1 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2 pin connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.1 connection diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3 electrical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 thermal data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.3 recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.4 electrical specifications for the digital section . . . . . . . . . . . . . . . . . . . . . 22 3.5 electrical specifications for the power sectio n . . . . . . . . . . . . . . . . . . . . . 23 3.6 electrical specifications for the analog section . . . . . . . . . . . . . . . . . . . . . 24 4 device overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.1 processing data path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.2 input oversampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.3 stcompressortm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.3.1 stc block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.3.2 band splitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.3.3 level meter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.3.4 mapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.3.5 attenuator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3.6 dynamic attack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3.7 offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.3.8 stereo link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.3.9 programming of coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.3.10 memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5i 2 c bus specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.1 communication protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.1.1 data transition or change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
STA381BW contents doc id 018835 rev 7 3/171 5.1.2 start condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.1.3 stop condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.1.4 data input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.2 device addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.3 write operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.3.1 byte write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.3.2 multi-byte write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.4 read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.4.1 current address byte read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.4.2 current address multi-byte read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.4.3 random address byte read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.4.4 random address multi-byte read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.4.5 write mode sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 5.4.6 read mode sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6 register description: ne w map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.1 clk register (addr 0x00) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 6.2 status register (addr 0x01) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 6.3 reset register (addr 0x02) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.4 soft volume register (addr 0x03) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.5 mvol register (addr 0x04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.6 finevol register (addr 0x05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.7 ch1vol register (addr 0x06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 6.8 ch2vol register (addr 0x07) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 6.9 post scaler register (addr 0x08) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.10 oper register (addr 0x09) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.11 funct register (addr 0x0a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 6.11.1 dual-band drc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 6.12 hpcfg register (addr 0x10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 6.13 configuration register a (addr 0x11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 6.13.1 master clock select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 6.13.2 interpolation ratio selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 6.13.3 fault-detect recovery bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 6.14 configuration register b (addr 0x12) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 6.14.1 serial data interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
contents STA381BW 4/171 doc id 018835 rev 7 6.14.2 serial data first bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 6.14.3 delay serial clock enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.14.4 channel input mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.15 configuration register c (addr 0x13) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.15.1 ffx compensating pulse size register . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.16 configuration register d (addr 0x14) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.16.1 dsp bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.16.2 post-scale link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.16.3 biquad coefficient link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.16.4 zero-detect mute enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.16.5 submix mode enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.17 configuration register e (addr 0x15) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.17.1 noise-shaper bandwidth selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.17.2 am mode enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.17.3 pwm speed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.17.4 zero-crossing enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.18 configuration register f (addr 0x16) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.18.1 invalid input detect mute enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 6.18.2 binary output mode clock loss detection . . . . . . . . . . . . . . . . . . . . . . . . 65 6.18.3 lrck double trigger protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.18.4 power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.18.5 external amplifier power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.19 volume control registers (addr 0x17 - 0x1b) . . . . . . . . . . . . . . . . . . . . . . 66 6.19.1 mute/line output configuration register (addr 0x17) . . . . . . . . . . . . . . . . 66 6.19.2 channel 3 / line output volume (addr 0x1b) . . . . . . . . . . . . . . . . . . . . . . 68 6.20 audio preset registers (0x1d) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.20.1 am interference frequency switching . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.20.2 bass management crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.21 channel configuration registers (addr 0x1f - 0x21) . . . . . . . . . . . . . . . . . 70 6.21.1 tone control bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.21.2 eq bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6.21.3 volume bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6.21.4 binary output enable registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6.21.5 limiter select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6.21.6 output mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.22 tone control register (addr 0x22) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
STA381BW contents doc id 018835 rev 7 5/171 6.22.1 tone control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 6.23 dynamic control registers (addr 0x23 - 0x26 / addr 0x43 - 0x46) . . . . . . 73 6.23.1 limiter 1 attack/release rate (l1ar addr 0x23) . . . . . . . . . . . . . . . . . . . 73 6.23.2 limiter 1 attack/release threshold (l1atrt addr 0x24) . . . . . . . . . . . . . 73 6.23.3 limiter 2 attack/release rate ( l2ar addr 0x25) . . . . . . . . . . . . . . . . . . 73 6.23.4 limiter 2 attack/release threshold ( l2 atrt addr 0x26) . . . . . . . . . . . . 73 6.23.5 limiter 1 extended attack threshold (addr 0x43) . . . . . . . . . . . . . . . . . . 77 6.23.6 limiter 1 extended release threshold (addr 0x44) . . . . . . . . . . . . . . . . . 77 6.23.7 limiter 2 extended attack threshold (addr 0x45) . . . . . . . . . . . . . . . . . . 78 6.23.8 limiter 2 extended release threshold (addr 0x46) . . . . . . . . . . . . . . . . . 78 6.24 user-defined coefficient control registers (addr 0x27 - 0x37) . . . . . . . . . . 78 6.24.1 coefficient address register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.24.2 coefficient b1 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.24.3 coefficient b1 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.24.4 coefficient b1 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6.24.5 coefficient b2 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.24.6 coefficient b2 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.24.7 coefficient b2 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.24.8 coefficient a1 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.24.9 coefficient a1 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.24.10 coefficient a1 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.24.11 coefficient a2 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . . 79 6.24.12 coefficient a2 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.24.13 coefficient a2 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.24.14 coefficient b0 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.24.15 coefficient b0 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.24.16 coefficient b0 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.24.17 coefficient write/read control register . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.24.18 user-defined eq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.24.19 pre-scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.24.20 post-scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.25 fault-detect recovery constant registers (addr 0x3c - 0x3d) . . . . . . . . . . 85 6.26 extended configuration register (addr 0x47) . . . . . . . . . . . . . . . . . . . . . . 85 6.26.1 extended post-scale range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.26.2 extended attack rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.26.3 extended biquad selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
contents STA381BW 6/171 doc id 018835 rev 7 6.27 pll configuration registers (address 0x52; 0x53; 0x54; 0x55; 0x56; 0x57) . . . . . . . . . . . . . . . . . . . . 87 6.28 short-circuit protection mode register s shok (address 0x58) . . . . . . . . 89 6.29 extended coefficient range up to -4...4 (address 0x5a) . . . . . . . . . . . . . . 90 6.30 miscellaneous registers (address 0x5c, 0x5d) . . . . . . . . . . . . . . . . . . . . 91 6.30.1 rate power-down enable (rpdnen) bit . . . . . . . . . . . . . . . . . . . . . . . . 91 6.30.2 bridge immediately off (bridgoff) bit (address 0x4b, bit d5) . . . . . . 91 6.30.3 channel pwm enable (cpwmen) bit . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.30.4 external amplifier hardware pin enabler (lpdp, lpd lpde) bits . . . . . 92 6.30.5 power-down delay selector (pndlsl[2:0]) bits . . . . . . . . . . . . . . . . . . . 92 6.30.6 short-circuit check enable bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 6.31 bad pwm detection registers (address 0x5e, 0x5f, 0x60) . . . . . . . . . . . 93 6.32 enhanced zero-detect mute and input level measurement (address 0x61-0x65, 0x3f, 0x40, 0x6f) . . . . . . . . . . . . . . . . . . . . . . . . . . 94 6.33 headphone/line out configuration register (address 0x66) . . . . . . . . . . . 96 6.34 f3xcfg (address 0x69; 0x6a) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 6.35 stcompressortm configuration register (address 0x6b; 0x6c) . . . . . . . 98 6.36 charge pump synchronization (address 0x70) . . . . . . . . . . . . . . . . . . . . . 98 6.37 coefficient ram crc protection (address 0x71-0x7d) . . . . . . . . . . . . . . 99 6.38 misc4 (address 0x7e) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 7 register description: sound terminal compatibility . . . . . . . . . . . . . 103 7.1 configuration register a (addr 0x00) . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.1.1 master clock select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 7.1.2 interpolation ratio select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7.1.3 fault-detect recovery bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7.2 configuration register b (addr 0x01) . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.2.1 serial data interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.2.2 serial audio input interface format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.2.3 serial data first bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 7.2.4 delay serial clock enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.2.5 channel input mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 7.3 configuration register c (addr 0x02) . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 7.3.1 ffx compensating pulse size register . . . . . . . . . . . . . . . . . . . . . . . . . 112 7.4 configuration register d (addr 0x03) . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 7.4.1 dsp bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
STA381BW contents doc id 018835 rev 7 7/171 7.4.2 post-scale link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.4.3 biquad coefficient link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.4.4 zero-detect mute enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.4.5 submix mode enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.5 configuration register e (addr 0x04) . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 7.5.1 noise-shaper bandwidth selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.5.2 am mode enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.5.3 pwm speed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.5.4 zero-crossing enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.5.5 soft volume update enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 7.6 configuration register f (addr 0x05) . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 7.6.1 output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 7.6.2 invalid input detect mute enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7.6.3 binary output mode clock loss detection . . . . . . . . . . . . . . . . . . . . . . . 121 7.6.4 lrck double trigger protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7.6.5 ic power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7.6.6 external amplifier power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 7.7 volume control registers (addr 0x06 - 0x0a) . . . . . . . . . . . . . . . . . . . . . 122 7.7.1 mute/line output configuration register . . . . . . . . . . . . . . . . . . . . . . . . . 122 7.7.2 master volume register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 7.7.3 channel 1 volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 7.7.4 channel 2 volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 7.7.5 channel 3 / line output volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 7.8 audio preset registers (addr 0x0c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 7.8.1 audio preset register (addr 0x0c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 7.8.2 am interference frequency switching . . . . . . . . . . . . . . . . . . . . . . . . . . 125 7.8.3 bass management crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 7.9 channel configuration registers (addr 0x0e - 0x10) . . . . . . . . . . . . . . . . 126 7.9.1 tone control bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 7.9.2 eq bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 7.9.3 volume bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 7.9.4 binary output enable registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 7.9.5 limiter select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 7.9.6 output mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 7.10 tone control register (addr 0x11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 7.10.1 tone control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
contents STA381BW 8/171 doc id 018835 rev 7 7.11 dynamic control registers (addr 0x12 - 0x15) . . . . . . . . . . . . . . . . . . . . 129 7.11.1 limiter 1 attack/release rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 7.11.2 limiter 1 attack/release threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 7.11.3 limiter 2 attack/release rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 7.11.4 limiter 2 attack/release threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 7.11.5 limiter 1 extended attack threshold (addr 0x32) . . . . . . . . . . . . . . . . . 133 7.11.6 limiter 1 extended release threshold (addr 0x33) . . . . . . . . . . . . . . . . 133 7.11.7 limiter 2 extended attack threshold (addr 0x34 . . . . . . . . . . . . . . . . . ) 134 7.11.8 limiter 2 extended release threshold (addr 0x35) . . . . . . . . . . . . . . . . 134 7.12 user-defined coefficient control regist ers (addr 0x16 - 0x26) . . . . . . . . . 134 7.12.1 coefficient address register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 7.12.2 coefficient b1 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . 134 7.12.3 coefficient b1 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . 134 7.12.4 coefficient b1 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 7.12.5 coefficient b2 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.12.6 coefficient b2 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.12.7 coefficient b2 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.12.8 coefficient a1 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.12.9 coefficient a1 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.12.10 coefficient a1 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.12.11 coefficient a2 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . 135 7.12.12 coefficient a2 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . 136 7.12.13 coefficient a2 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 7.12.14 coefficient b0 data register bits 23:16 . . . . . . . . . . . . . . . . . . . . . . . . . 136 7.12.15 coefficient b0 data register bits 15:8 . . . . . . . . . . . . . . . . . . . . . . . . . . 136 7.12.16 coefficient b0 data register bits 7:0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 7.12.17 coefficient write/read control register . . . . . . . . . . . . . . . . . . . . . . . . . 136 7.12.18 user-defined eq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 7.12.19 pre-scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 7.12.20 post-scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 7.13 fault-detect recovery constant registers (addr 0x2b - 0x2c) . . . . . . . . . 141 7.14 device status register (addr 0x2d) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 7.15 eq coefficients configurat ion register (addr 0x31) . . . . . . . . . . . . . . . . . 141 7.16 extended configuration register (addr 0x36) . . . . . . . . . . . . . . . . . . . . . 142 7.16.1 dual-band drc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 7.16.2 extended post-scale range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
STA381BW contents doc id 018835 rev 7 9/171 7.16.3 extended attack rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 7.16.4 extended biquad selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 7.17 eq soft volume configuration registers (addr 0x37 - 0x38) . . . . . . . . . . 145 7.18 extra volume resolution configuration registers (address 0x3f; 0x40) . . 146 7.19 pll configuration registers (address 0x41; 0x42; 0x43; 0x44; 0x45; 0x46) . . . . . . . . . . . . . . . . . . . 147 7.20 short-circuit protection mode register s shok (address 0x47) . . . . . . . 149 7.21 extended coefficient range up to -4...4 (address 0x49, 0x4a) . . . . . . . . 151 7.22 miscellaneous registers (address 0x4b, 0x4c) . . . . . . . . . . . . . . . . . . . 151 7.22.1 rate power-down enable (rpdnen) bit (address 0x4b, bit d7) . . . . . 151 7.22.2 bridge immediately off (bridgoff) bit (address 0x4b, bit d5) . . . . . 152 7.22.3 channel pwm enable (cpwmen) bit (address 0x4b, bit d2) . . . . . . . 152 7.22.4 external amplifier hardware pin enabler (lpdp, lpd lpde) bits (address 0x4c, bit d7, d6, d5) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 7.22.5 power-down delay selector (pndlsl[2:0]) bits (address 0x4c, bit d4, d3, d2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 7.22.6 short-circuit check enable bit (address 0x4c, bit d0) . . . . . . . . . . . . . 153 7.23 bad pwm detection registers (address 0x4d, 0x4e, 0x4f) . . . . . . . . . . 154 7.24 enhanced zero-detect mute and input level measurement (address 0x50-0x54, 0x2e, 0x2f and 0x5e) . . . . . . . . . . . . . . . . . . . . . 155 7.25 headphone/line out configuration register (address 0x55) . . . . . . . . . . 157 7.26 f3xcfg (address 0x58; 0x59) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 7.27 stcompressortm configuration regist er (address 0x5a; 0x5b) . . . . . . 159 7.28 charge pump synchronization (address 0x5f ) . . . . . . . . . . . . . . . . . . . 160 7.29 coefficient ram crc protection (address 0x60-0x6c) . . . . . . . . . . . . . 161 7.30 misc3 (address 0x6e) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 7.31 misc4 (address 0x7e) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 8 applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 8.1 application schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 8.2 headphone and 2 vrms line out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 8.3 typical output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 9 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 10 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
list of tables STA381BW 10/171 doc id 018835 rev 7 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. pin list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 3. absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 4. thermal data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 5. recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 table 6. electrical specifications - digital section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 table 7. electrical specifications - power section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 8. electrical specifications for the analog section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 9. coefficients extended-range configuration 0x74h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 table 10. compressor ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 table 11. conversion example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 12. stc coefficients memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 13. stc band splitter filters memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 8 table 14. default register map table: new map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 15. clk register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 16. status register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 17. reset register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 table 18. soft volume register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 table 19. master volume register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 table 20. fine volume register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 table 21. channel 1 volume register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 table 22. channel 2 volume register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 table 23. oper register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 table 24. oper configuration selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 table 25. funct register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 26. hpcfg register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 27. master clock select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 28. input sampling rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 29. internal interpolation ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 30. ir bit settings as a function of the input sampling rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 31. fault-detect recovery bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 32. serial data first bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 33. support serial audio input formats for msb-first (saifb = 0) . . . . . . . . . . . . . . . . . . . . . . . 60 table 34. supported serial audio input formats for lsb-first (saifb = 1) . . . . . . . . . . . . . . . . . . . . . 61 table 35. delay serial clock enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 table 36. channel input mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 table 37. ffx compensating pulse size bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 table 38. compensating pulse size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 table 39. dsp bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 table 40. post-scale link. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 table 41. biquad coefficient link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 table 42. zero-detect mute enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 43. submix mode enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 44. noise-shaper bandwidth selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 45. am mode enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 table 46. pwm speed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 47. zero-crossing enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 48. invalid input detect mute enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
STA381BW list of tables doc id 018835 rev 7 11/171 table 49. binary output mode clock loss detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 table 50. lrck double trigger protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 table 51. ic power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 table 52. external amplifier power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 table 53. line output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 table 54. mute configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 table 55. channel 3 volume as a function of ch3vol[7:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 table 56. am interference frequency switching bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 table 57. audio preset am switching frequency selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 table 58. bass management crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 table 59. bass management crossover frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 table 60. tone control bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 table 61. eq bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 62. volume bypass register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 63. binary output enable registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 64. channel limiter mapping as a function of c3ls bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 table 65. channel output mapping as a function of c3om bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 66. tone control boost/cut as a function of btc and ttc bits . . . . . . . . . . . . . . . . . . . . . . . . . 72 table 67. limiter attack rate as a function of lxa bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 table 68. limiter release rate as a function of lxr bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5 table 69. limiter attack threshold as a function of lxat bits (ac mode) . . . . . . . . . . . . . . . . . . . . . . 76 table 70. limiter release threshold as a function of lxrt bits (ac mode). . . . . . . . . . . . . . . . . . . . . 76 table 71. limiter attack threshold as a function of lxat bits (drc mode) . . . . . . . . . . . . . . . . . . . . 77 table 72. limiter release threshold as a function of lxrt bits (drc mode) . . . . . . . . . . . . . . . . . . . 77 table 73. ram block for biquads, mixing, scaling and bass management. . . . . . . . . . . . . . . . . . . . . 84 table 74. extended post-scale range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 table 75. extended attack rate, limiter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 table 76. extended attack rate, limiter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 table 77. extended biquad selector, biquad 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 table 78. extended biquad selector, biquad 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 table 79. extended biquad selector, biquad 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 table 80. pll factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 table 81. pll register 0x54 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 82. pll register 0x55 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 83. pll register 0x56 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 table 84. pll register 0x57 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 table 85. coefficients extended range configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 table 86. external amplifier enabler configuration bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 table 87. pndlsl bits configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 table 88. zero-detect threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 table 90. manual threshold register 0x3f, 0x40 and 0x6f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 table 89. zero-detect hysteresis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 table 91. headphone/line out configuration bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 6 table 92. f3x configuration register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 table 93. f3x configuration register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 table 94. register stccfg0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 95. stccfg0 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 96. register stccfg1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 97. stccfg1 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 table 98. charge pump sync configuration bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 8 table 99. misc register 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 table 100. i 2 c registers summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
list of tables STA381BW 12/171 doc id 018835 rev 7 table 101. master clock select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 table 102. input sampling rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 table 103. internal interpolation ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 table 104. ir bit settings as a function of the input sampling rate . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 table 105. fault-detect recovery bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 table 106. serial audio input interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 table 107. serial data first bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 table 108. support serial audio input formats for msb-first (saifb = 0) . . . . . . . . . . . . . . . . . . . . . . 109 table 109. supported serial audio input formats for lsb-first (saifb = 1) . . . . . . . . . . . . . . . . . . . . 110 table 110. delay serial clock enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 table 111. channel input mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 table 112. ffx compensating pulse size bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 table 113. compensating pulse size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 table 114. dsp bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 table 115. post-scale link. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 table 116. biquad coefficient link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 table 117. zero-detect mute enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 table 118. submix mode enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 table 119. noise-shaper bandwidth selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 table 120. am mode enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 table 121. pwm speed mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 table 122. zero-crossing enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 table 123. soft volume update enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 table 124. output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 table 125. output configuration engine selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 15 table 126. invalid input detect mute enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 table 127. binary output mode clock loss detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 table 128. lrck double trigger protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 table 129. ic power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 table 130. external amplifier power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 table 131. line output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 table 132. mute configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 table 133. master volume offset as a function of mvol[7:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 table 134. channel volume as a function of cxvol[7:0] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 table 135. am interference frequency switching bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 table 136. audio preset am switching frequency selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 table 137. bass management crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 table 138. bass management crossover frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 table 139. tone control bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 table 140. eq bypass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 table 141. volume bypass register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 table 142. binary output enable registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 table 143. channel limiter mapping as a function of cxls bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 table 144. channel output mapping as a function of cxom bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 table 145. tone control boost/cut as a function of btc and ttc bits . . . . . . . . . . . . . . . . . . . . . . . . 128 table 146. limiter attack rate as a function of lxa bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 31 table 147. limiter release rate as a function of lxr bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1 table 148. limiter attack threshold as a function of lxat bits (ac mode) . . . . . . . . . . . . . . . . . . . . . 132 table 149. limiter release threshold as a function of lxrt bits (ac mode). . . . . . . . . . . . . . . . . . . . 132 table 150. limiter attack threshold as a function of lxat bits (drc mode) . . . . . . . . . . . . . . . . . . . 133 table 151. limiter release threshold as a function of lxrt bits (drc mode) . . . . . . . . . . . . . . . . . . 133 table 152. ram block for biquads, mixing, scaling and bass management. . . . . . . . . . . . . . . . . . . . 140
STA381BW list of tables doc id 018835 rev 7 13/171 table 153. status register bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 table 154. extended post-scale range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 table 155. extended attack rate, limiter 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 table 156. extended attack rate, limiter 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 table 157. extended biquad selector, biquad 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 44 table 158. extended biquad selector, biquad 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 44 table 159. extended biquad selector, biquad 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 44 table 160. soft volume update enable, increase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5 table 161. soft volume update enable, decrease . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 table 162. volume fine-tuning steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 table 163. extra volume resolution enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 table 164. pll factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 table 165. pll register 0x43 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 table 166. pll register 0x44 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 table 167. pll register 0x45 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 table 168. pll register 0x46 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 table 169. coefficients extended range configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 table 170. external amplifier enabler configuration bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2 table 171. pndlsl bits configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 table 172. zero-detect threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 table 173. zero-detect hysteresis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 table 174. manual threshold register 0x2e, 0x2f and 0x5e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 table 175. headphone/line out configuration bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7 table 176. f3x configuration register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 table 177. f3x configuration register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 table 178. stcompressortm configuration bits1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 table 179. stcompressortm configuration bits 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 table 180. charge pump sync configuration bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 0 table 181. misc register 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 table 182. misc4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 table 183. vqfn48 (7 x 7 x 0.9 mm) package dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 table 184. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
list of figures STA381BW 14/171 doc id 018835 rev 7 list of figures figure 1. block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 figure 2. pin connections vqfn48 (top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8 figure 3. test circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 figure 4. processing path, first part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 5. processing path, second part: 2.1 output with individually configur able anticlipper/drcs. 26 figure 6. processing path, second part: 2.0 output with b 2 drc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 7. processing path, second part: 2.1 output configuration with stcompressor tm . . . . . . . . . 27 figure 8. stcompressor tm block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 figure 9. band splitter with 4th order filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 10. stcompressor tm behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 11. stcompressor tm behavior as a limiter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 figure 12. offset effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 13. stereo link block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 14. write mode sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 15. read mode sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 figure 16. oper = 00 (default value) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 17. oper = 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 18. oper = 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 19. oper = 01 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 figure 20. output mapping scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 figure 21. 2.0 channels (oper = 00) pwm slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 figure 22. 2.1 channels (oper = 11) pwm slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 figure 23. 2.1 channels (oper = 10) pwm slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 figure 24. b 2 drc scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 figure 25. basic limiter and volume flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 figure 26. short-circuit detection timing diagram (no short detected) . . . . . . . . . . . . . . . . . . . . . . . . . 90 figure 27. alternate function for intline pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 figure 28. coefficients direct access single-write operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 figure 29. coefficients direct access multiple-write operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 figure 30. coefficients direct access single-read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 figure 31. ocfg = 00 (default value) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 figure 32. ocfg = 01 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 figure 33. ocfg = 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 figure 34. ocfg = 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 figure 35. output mapping scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 figure 36. 2.0 channels (ocfg = 00) pwm slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 figure 37. 2.1 channels (ocfg = 01) pwm slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 figure 38. 2.1 channels (ocfg = 10) pwm slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 figure 39. basic limiter and volume flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1 figure 40. b 2 drc scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 figure 41. extra resolution volume scheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 figure 42. short-circuit detection timing diagram (no short detected) . . . . . . . . . . . . . . . . . . . . . . . . 150 figure 43. alternate function for intline pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 figure 44. external audio source to line/headphone out application scheme . . . . . . . . . . . . . . . . . . 164 figure 45. f3x (from sai) source to line/headphone out application scheme. . . . . . . . . . . . . . . . . . 165 figure 46. f3x auxiliary analog output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 figure 47. headphone and line out block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 figure 48. output configuration for stereo btl mode in filterlight configuration . . . . . . . . . . . . . . . . 167
STA381BW list of figures doc id 018835 rev 7 15/171 figure 49. vqfn48 (7 x 7 x 0.9 mm) package outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
description STA381BW 16/171 doc id 018835 rev 7 1 description the STA381BW is an integrated solution embedding digital audio processing, digital amplification, ffx tm power output stage, headphone and 2 vrms line outputs. it is part of the sound terminal ? family and provides full digital audio streaming from the source to the speaker, offering cost effectiveness, low power dissipation and sound enrichment. the STA381BW input section consists of a flexible digital input serial audio interface, feeding the digital processing unit, and an analog 1 vrms input for a seamless connection with pure analog sources. the serial audio data input interface supports many formats, including the popular iis format. the STA381BW is based on an ffx tm (fully flexible amplificat ion) processor, proprietary technology from stmicroelectronics. ffx tm is the evolution of the st ternary technology: the advanced processor is available for ternary, binary, binary differential and phase shift pwm modulation. the STA381BW embeds the ternary, binary and binary differential implementations, a subset of the full capabilit y of the ffx tm processor. the STA381BW power section consists of four independent half-bridges. these can be configured via digital control to operate in different modes. a 2.1-channel setup can be implemented with two half-bridges (l/r) together with a single full-bridge (subwoofer). alternatively, the 2.0-channel setup can be done with two full-bridges. when using this configuration, an external amplifier for the sw channel can also be driven through the pwm output. the STA381BW is able to deliver 2 x 20 w (ternary) into an 8 load at 18 v or 2 x 9 w (binary) into a 4 load, plus 1 x 20 w (ternary) into an 8 load at 18 v. the STA381BW also provides a capless headphone out (with embedded negative charge pump), able to deliver up to 40 mw into a 32 load or, alternatively, can be configured as a 2 vrms line output. the STA381BW digital processing unit includes up to 12 programmable biquads (eqs), allowing perfect sound equalization and offering advanced noise-shaping techniques. moreover, the coefficient range ensures a great variety of filter shapes (low/high-pass, low/high shelf, peak, notch, band-pass). the equalization engine is fully compatible with the st speaker compensation technology embedded into the apworkbench suite. a state-of- the-art multi-band drc, stcompressor tm equalizes the system to provide active speaker protection with full audio quality preservation against sudden sound peaks. moreover, stspeakersafe tm technology offers reliable speaker protection under any condition. the master clock can be from stable bicki (64xfs, 50% duty cycle) or external xti.
STA381BW description doc id 018835 rev 7 17/171 1.1 block diagram figure 1. block diagram
pin connections STA381BW 18/171 doc id 018835 rev 7 2 pin connections 2.1 connection diagram figure 2. pin connections vqfn48 (top view) 1 2 3 4 5 6 7 8 9 10 11 12 3 6 3 5 3 4 33 3 2 3 1 3 0 29 2 8 27 26 25 vcc_reg v ss _reg out2b gnd2 vcc2 out2a out1b vcc1 gnd1 out1a vdd_reg gnd_reg mclk agndpll vregfilt twarn/ffx4a eapd/ffx4b ffx 3 b ffx 3 a gnddig1 vdddig1 vdd 3 v 3 chp cpp gndp s ub 1 3 14 15 16 17 1 8 19 20 21 22 2 3 24 4 8 47 46 45 44 4 3 42 41 40 3 9 38 3 7 f 3 x_filt f 3 xl f 3 xr lineinl lineinr linehpout_l linehpout_r gnda s oftmute vdd 3 v 3 cpv ss cpm vdddig2 gnddig2 te s tmode s a s cl s da intline pwdn re s et s di lrcki bicki s ta 38 1bw
STA381BW pin connections doc id 018835 rev 7 19/171 2.2 pin description table 2. pin list vqfn 48-pin name type description 1 vcc_reg power vcc reg 2 vss_reg power vss reg, vcc_reg-3.3 v 3 out2b output half-bridge 2b output 4 gnd2 power half-bridge 2a and 2b ground 5 vcc2 power half-bridge 2a and 2b supply 6 out2a output half-bridge 2a output 7 out1b output half-bridge 1b output 8 vcc1 power half-bridge 1a and 1b supply 9 gnd1 power half-bridge 1a and 1b ground 10 out1a output half-bridge 1a output 11 vdd_reg power vdd reg 3.3 v 12 gnd_reg power dc reg ground 13 f3x_filt power f3x reference voltage 14 f3xl output f3x analog out left channel 15 f3xr output f3x analog out right channel 16 lineinl input line in left channel 17 lineinr input line in right channel 18 linehpout_l output headphone/line driver left channel 19 linehpout_r output headphone/line driver right channel 20 gnda power headphone/line driver power ground 21 softmute input soft mute 22 vdd3v3 power +3 v ldo power supply 23 cpvss power -3.3 v charge pump pin 24 cpm filter chp cfly negative 25 gndpsub power charge pump ground 26 cpp filter chp cfly positive 27 vdd3v3chp power charge pump power supply 28 vdddig1 power i/o ring power supply 29 gnddig1 power digital core ground 30 ffx3a output digital pwm line out 31 ffx3b output digital pwm line out
pin connections STA381BW 20/171 doc id 018835 rev 7 32 eapd/ffx4b output digital pwm line out 33 twarn/ffx4a output digital pwm line out 34 vregfilt power digital vdd from core 35 agndpll power pll analog ground 36 mclk input pll input clock 37 bicki input iis serial clock 38 lrcki input iis left/right clock 39 sdi input iis serial data input 40 reset input reset 41 pwdn input device power-down 0 = power-down 1 = normal operation 42 intline output fault interrupt 43 sda i/o iic serial data 44 scl input iic serial clock 45 sa input iic select address (pull-down) 46 test_mode input this pin must be connected to ground (pull-down) 47 gnddig2 power digital i/o ground 48 vdddig2 power digital core ldo supply table 2. pin list (continued) vqfn 48-pin name type description
STA381BW electrical specifications doc id 018835 rev 7 21/171 3 electrical specifications 3.1 absolute maximum ratings warning: stresses beyond those listed in table 3 above may cause permanent damage to the device. these are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated under ?recommended operating conditions? are not implied. exposure to absolute-maximum-rated conditions for extended periods may affect device reliability. in the real application, power supplies with nominal values rated within the recommended operating conditions may rise beyond the maximum operating conditions for a short time when no or very low current is sunk (amplifier in mute state). in this case the reliability of the device is guaranteed, provided that the absolute maximum ratings are not exceeded. 3.2 thermal data table 3. absolute maximum ratings symbol parameter min typ max unit vcc power supply voltage (vccxa, vccxb) -0.3 30 v vdd_dig digital supply voltage -0.3 4 v vdd3v3 vdd3v3chp charge pump and analog path ldo supply -0.3 4 v top operating junction temperature 0 150 c tstg storage temperature -40 150 c r line load impedance - line driver mode 1 k r hp load impedance - headphone driver mode 16 r btl load impedance - power output-btl mode 5 table 4. thermal data symbol parameter min typ max unit rth j-case thermal resistance junc tion-case (thermal pad) 1.5 c/w tth-sdj thermal shutdown junction temperature 150 c tth-w thermal warning temperature 130 c tth-sdh thermal shutdown hysteresis 20 c
electrical specifications STA381BW 22/171 doc id 018835 rev 7 3.3 recommended operating conditions table 5. recommended operating conditions 3.4 electrical specifications for the digital section the specifications given in this secti on are valid for the operating conditions: vdd_dig = 3.3 v, t amb = 25 c. (shou symbol parameter min typ max unit vcc power supply voltage (vccxa, vccxb) 4.5 26 v vdd_dig digital supp ly voltage 2.7 3.3 3.6 v vdd3v3 vdd3v3chp charge pump and analog path ldo supply 2.7 3.3 3.6 v tamb ambient temperature 0 70 c r line load impedance - line driver mode 5 10 k r hp load impedance - headphone driver mode 16 32 r btl load impedance - power output-btl mode 5 8 table 6. electrical specifications - digital section symbol parameter conditions min typ max unit i il low level input current without pull-up/down device vi = 0 v 0.5 a i ih high level input current without pull-up/down device vi = vdd_dig = 3.3 v 0.1 a v il low level input voltage 0.8 v v ih high level input voltage 2.0 v v ol low level output voltage iol = 2 ma 0.15 v v oh high level output voltage ioh = 2 ma vdd_dig -0.15 v r pu pull-up/down resistance 50 k
STA381BW electrical specifications doc id 018835 rev 7 23/171 3.5 electrical specificatio ns for the power section the specifications given in this section are valid for the operating conditions: v cc =24v, f=1khz, f sw = 384 khz, t amb = 25 c and r l = 8 , unless otherwise specified. table 7. electrical specifications - power section symbol parameter conditions min typ max unit po output power btl digital limited (1) 20 w output power se digital limited (1) 5 output power se r l = 4 digital limited (1) 9 r dson power pchannel/nchannel mosfet l d = 1.5 a 120 m gp power pchannel r dson matching l d = 1.5 a 95 % gn power nchannel r dson matching l d = 1.5 a 95 % idss power pchannel/nchannel leakage 10 a i ldt low current dead time (static) resistive load (2) 815ns t r rise time re sistive load (2) 10 18 ns t f fall time resistive load (2) 10 18 ns i vcc supply current from vcc in power-down pwrdn = 0 0.1 1 a supply current from vcc in operation pcm input signal = -60 dbfs, switching frequency = 384 khz, no lc filters 52 60 ma ilim overcurrent limit 4 5 6.5 a uvl undervoltage protection 3.5 4.3 v v ov overvoltage protection 28.25 v t min output minimum pulse width no load 20 30 60 ns dr dynamic range 100 db snr signal-to-noise ratio, ternary mode a-weighted 100 db signal-to-noise ratio, binary mode a-weighted 90 db thd+n total harmonic distortion + noise ffx stereo mode, po = 1 w, f=1khz 0.2 % x ta l k crosstalk ffx stereo mode, <5 khz, one channel driven at 1 w and other channel measured 80 db peak efficiency, ffx mode po = 2 x 20 w into 8 90 % 1. the related thd can be defined through app ropriate drc settings (see section: 4.3: stcompressortm ) 2. refer to figure 3: test circuit .
electrical specifications STA381BW 24/171 doc id 018835 rev 7 figure 3. test circuit 3.6 electrical specificatio ns for the analog section the specifications given in this section are valid for the operating conditions: v cc = 24 v f=1khz, t amb = 25 c, vdd3v3 = 3.3 v, r line = 5 k , r hp = 32 , unless otherwise specified. table 8. electrical specifications for the analog section symbol parameter conditions min typ max unit vout output voltage for line out g v = 2.5, thd < 1%, rload = 5 k 1.9 2.1 vrms pout output voltage for hp out thd+n = 10%, g v = 2.5, rload = 32 40 mw dr dynamic range for line out vout = 2 v rms , f in = 200 hz, v in = 0.8 mv (-60 dbfs) 100 db x-talk channel separation for line out v out = 2 vrms, g v = 2.5 75 db psrr power supply rejection ratio hp mode, p 0 = 15 mw 70 db line out mode, v out = 2 vrms 70 r in line input resistance 30 (1) 1. refer to 8.2: headphone and 2 vrms line out , figure 47: headphone and line out block diagram , r in = r1 k thd+n total harmonic distortion + noise hp mode, v out = 200 mv rms , g v = 2.5 0.03 % line out mode, v out = 0.2 vrms, g v = 2.5 0.03 %
STA381BW device overview doc id 018835 rev 7 25/171 4 device overview the mentioned hyperlink in this section relates to the default new map section 6: register description: new map . 4.1 processing data path the whole STA381BW processing chain is composed of two consecutive sections. in the first one dual-channel processing is implemented ( figure 4 ) and then each channel is fed into the post-mixing block allowing to generate either a third channel (typically used in 2.1 output configurations together with crossover filters) or to have the channels processed by the dual-band drc block (2.0 output configuration with crossover filters used to define the cutoff frequency of the two bands). the first section begins with a 2x oversampling fir filter allowing 2*fs audio processing. then a selectable high-pass filter removes the dc level (enabled if hfb = 0). the channel 1 and 2 processing chain can include up to 8 filters, depending on the selected configuration (bits bql, bq5, bq6, bq7 and xo[3:0]). by default, 4 independent filters per channel are enabled, plus the pre-configured bass and treble controls (bql=0, bq5=0, bq6=0, bq7=0). the STA381BW offers the possibility to shar e the filter coeffici ents between the two processing channels. when this option is set (bql=1), filters from the 1st to the 4th have the same coeffcients set. under these conditions, filters from the 5th to 7th can be used as custom filters as well (provided the relevant bqx bits are set). once again filter coefficients are shared between the two processing channels. moreover the common 8th filter, from the subsequent processing section, can be available on both channels (provided the pre-defined crossover frequencies are not used, xo[3:0]=0, and the dual-band drc is not used). figure 4. processing path, first part l r i2 s inp u t interf a ce x2over- - sa mp ling fir pre- - s c a le hi-p ass filter bi qua d #1 bi qua d #2 bi qua d # 3 bi qua d #4 u s erd defined filter s de-emph or bi qua d#5 b ass or bi qua d#6 tre b le or bi qua d#7 tone control x2over- - sa mp ling fir pre- - s c a le hi-p ass filter bi qua d #1 bi qua d #2 bi qua d # 3 bi qua d #4 u s erd defined filter s de-emph or bi qua d#5 b ass or bi qua d#6 tre b le or bi qua d#7 tone control sa mpling fre qu ency = f s sa mp lin g fre qu ency = 2xf s sa mp lin g fre qu ency = 2xf s
device overview STA381BW 26/171 doc id 018835 rev 7 the second processing stage embeds a mixing block, a biquadratic/crossover filter, a drc stage, the volume control, a dc cut filter and a post scaler. depending on the device settings, the following configuration and features are available: 2.1 output with individually configurable anticlipper/drcs ( figure 5 ): two individually configurable drc/anticlippers are available wh ile the eighth biquadratic filter, jointly with the mixer block, can be used to perform lfe. this configuration and features ensure the backward compatibilit y with previous sound terminal ? products. figure 5. processing path, second part: 2.1 output with individually configurable anticlipper/drcs cro ss over fre qu ency determined b y xo s etting (u s er defin ed if xo=0000) c1mx1 u s er-defined mix coefficient s + ch a nnel ? bi qua d# 8 -------------- hi-p ass xo filter ch a nnel 1 vo l u me an ti-clipper / drc dc c u t filter po s t s c a le c1mx2 l r c2mx1 + ch a nnel ? bi qua d# 8 -------------- hi-p ass xo filter ch a nnel 2 vo l u me an ti-clipper / drc dc c u t filter po s t s c a le c2mx2 c 3 mx1 + ch a nnel 3 bi qua d# 8 - - - - - - -- -- -- -- lo w-p ass xo filter an ti-clipper / drc dc c u t filter po s t s c a le c 3 mx2 ch a nnel 3 vo l u me
STA381BW device overview doc id 018835 rev 7 27/171 2.0 output with b 2 drc ( figure 6 ): the mixer and the eighth biquadratic filter are used to divide the channel into two sub-bands, then each sub-band is independently processed by a drc block. the two bands are then re-composed and fed to the following processing blocks. the crossover frequency is user-selectable. this configuration and features ensure the backward compatib ility with the previous sound terminal ? products. for further information please refer to chapter 6.11.1: dual-band drc . figure 6. processing path, second part: 2.0 output with b 2 drc 2.1 output with stcompressor tm ( figure 7 ): the STA381BW embeds the latest, state- of-the-art multi-band dynamic, range compressor, called stcompressor tm . when using this configuration, up to 10 biquad filters are available for dedicated processing. please refer to section 4.3: stcompressortm for further information about this feature. figure 7. processing path, second part: 2.1 output configuration with stcompressor tm cro ss over fre qu ency determined b y xo s etting (u s er defined if xo=0000) c1mx1 u s er-defined mix coefficient s + b 2 drc hi-p ass xo filter dc c u t filter c1mx2 l r c2mx1 + b 2 drc hi-p ass xo filter c2mx2 c 3 mx1 + c 3 mx2 - ch a nnel 1 vol u me drc 1 ch a nnel 3 vo l u me drc 2 po s t s c a le ++ - + dc c u t filter ch a nnel 3 vol u me drc 2 ch a nnel 2 vo l u me drc 1 po s t s c a le + cro ss over fre qu ency determined b y xo s etting (u s er defined if xo=0000) c1mx1 u s er-defined mix coefficient s + ch a nnel ? bi qua d# 8 -------------- hi-p ass xo filter s tcompre ss or vo l u me an d limiter dc c u t filter po s t s c a le c1mx2 l r c2mx1 + ch a nnel ? bi qua d# 8 -------------- hi-p ass xo filter s tcompre ss or vo l u me an d limiter dc c u t filter po s t s c a le c2mx2 c 3 mx1 + ch a nnel 3 bi qua d# 8 -------------- low-p ass xo filter vo l u me an d limiter dc c u t filter po s t s c a le c 3 mx2
device overview STA381BW 28/171 doc id 018835 rev 7 4.2 input oversampling figure 4 shows the input oversampling block in front of the main processing. when 32 khz fs is used, the default x2 oversampling ratio can be increased to a x3. activating this feature, it is possible to have a 384 khz pwm switching frequency (instead of the default 256 khz) when 32 khz fs is used. when bit 0 of register pllcfg1 is set to one, th e feature is activated so that the pll ratio is modified to generate 49.152 mhz internal clock and the audio data path (after the input oversampling block) is running at 96 khz. it is not recommended to use the x3 oversampling feature when fs > 32 khz because of the pll maximum frequency constraint. 4.3 stcompressor tm the stcompressor tm (stc from now on) is a stereo, dual-band dynamic range control (drc) and its main purpose is to provide optimum output power level control for speaker protection, preserving as much as possible the original audio quality of the signal. tw o m a i n i 2 c registers control the stc behavior: stccfg0 and stccfg1. on top of the data flow control bits, these registers also allow enabling the checksum engine to protect the stc filters from erroneous coefficients downloads, thus improving the final application circuitry and safety of the speakers.
STA381BW device overview doc id 018835 rev 7 29/171 4.3.1 stc block diagram figure 8. stcompressor tm block diagram the stc takes as input 2 channels and every channel is processed independently (i.e. an independent drc for each band of each channel) following the steps listed below ( figure 8 ): 1. splits the input signal into 2 bands (band splitter) 2. measures the level of the signal (level meter) 3. computes the attenuation (mapper) 4. applies the attenuation and offset (attenuator) the band splitter settings are common to both the processing channels while the settings of the remaining blocks can be independently set for each band of each processing channel. caution: all the settings explained hereafter apply only to the behavior of the stcompressor tm . for the settings concerning other device operating configurations (see chapter 4.1: processing data path ) please refer to the appropriate paragraphs and registers. 4.3.2 band splitter the band splitter block is used to divide the signal into 2 sub-bands (typically low- and high- frequency bands). this is done through two 2 nd order biquads (iir filters) for each band, thus allowing to have up to a 4 th order filter per band. this feature guarantees a totally flat band recombination (see figure 9 ). using different filtering orders, indeed, causes a non- negligible gain around the filter?s cutoff frequency, endangering the overall audio fidelity and, eventually, also the safety of the speaker. the sub-band recombination can be enabled or disabled. level meter m a pper atten ua to r off s et x level meter m a pper atten ua to r x off s et + b a nd s p litter b a nd 0 (low fre qs ) b a nd 1 (high fre qs ) in p u t ch 0 o u tp u t ch 0 drc 0 drc 1 level meter m a pper atten ua to r off s et x level meter m a pper atten ua to r x off s et + b a nd s p litter b a nd 0 (low fre qs ) b a nd 1 (high fre qs ) in p u t ch 1 o u tp u t ch 1 drc 2 drc 3
device overview STA381BW 30/171 doc id 018835 rev 7 the band splitter filter coefficients have a user-selectable range [-1, 1), [-2, 2) and [-4, 4). the ram coefficient 0x7 is responsible for these settings according to ta bl e 9 . the range default value is [-4, 4). table 9. coefficients extended-range configuration 0x74h please refer to section 6.24: user-defined coefficient control registers (addr 0x27 - 0x37) and to ta bl e 1 3 for further details. figure 9. band splitter with 4 th order filtering 4.3.3 level meter the level meter block measures the input signal level (in db). two kinds of measures are performed: peak and rms. the mapper config uration and the input signal automatically determine which measurement to take into account. 4.3.4 mapper the mapper block computes the appropriate attenuation value (expressed in db) to be applied to the signal, basing its calculations on the level meter output value, on the compressor threshold and on the limiter threshold.the attenuation value is then passed to the attenuator block. cext_bx[1] cext_bx[0] range 00 [-1;1) 01 [-2;2) 10 [-4;4) 1 1 reserved ? ? += bq 0 bq 0 bq 1 bq 1 b a nd s plitter b a nd 1 b a nd 0 inp u t ch x o u tp u t ch x
STA381BW device overview doc id 018835 rev 7 31/171 the stc reacts differently depending on these three parameters ( figure 10 ): level meter output value < compressor threshold < limiter threshold: under these circumstances the signal level is small enough to not require any type of limiting/compressing action. the signal remains unchanged. compressor threshold < level meter output value < limiter threshold: under these circumstances the signal level is compressed to a ratio determined by the compressor rate. compressor threshold < limiter threshold < level meter output value: under these circumstances the signal level exceeds the limiter threshold which represents the maximum output power allowed. the signal is limited to avoid unpredictable effects and damages. the compressor threshold, the limiter threshold and the compressor rate are all user- selectable parameters. the compressor threshold range of value is [-48, 0] db with a 0.25 db step. the limiter threshold range of values is [-24, +12] db with a 0.25 db step. the compressor ratio range of value is [0, 15], the meaning of these values is specified in ta bl e 1 0 . for further details please refer to ta b l e 1 2 . either setting the compressor rate to 1:1 or setting the compressor threshold greater than the limiter threshold makes the stc behave as a pure limiter ( figure 11 ). figure 10. stcompressor tm behavior input [db] [db] output c.t. l.t. l.t. comp c.r. c.t. l.t. compression zone limiting zone linear zone
device overview STA381BW 32/171 doc id 018835 rev 7 figure 11. stcompressor tm behavior as a limiter table 10. compressor ratio compressor ratio ratio value 01:1 1 1:1.25 21:1.5 3 1:1.75 41:2 51:2.5 61:3 71:3.5 81:4 91:4.5 10 1:5 11 1:5.5 12 1.6 13 1:7 14 1:8 15 1:16 input l.t. [db] [db] output l.t. limiting zone linear zone
STA381BW device overview doc id 018835 rev 7 33/171 4.3.5 attenuator the attenuation is characterized by tw o different phases: attack and release. given an input signal above the limiter threshold, during the attack phase the stc decreases the gain in order to reach the output level determined by the mapper. in this process the key parameter is the attack rate (db/ms) which determines how fast the stc reacts according to the following equation: where: output signal level is the attenuated signal coming from the attenuator block itself and used as feedback mapper level is the target signal level to be reached the attack rate is user-selectable and its range is [0, +16] db/ms with a 0.25 db/ms step. given an input signal moving below the limiter threshold, during the release phase the stc increases the gain in order to return the original input signal dynamic. in this process the key parameter is the release rate (db/ms) which determines how fast the stc releases the attenuation on the input signal according to the following equation: the release rate is user-selectable and its range is [0.0078, 1) db/ms with a 0.0039 db/ms step. 4.3.6 dynamic attack due to its dynamic, the input signal may exceed the limiter threshold by a variable amount of decibels. in such different situations it might be useful to be able to tune the attack rate to make the stc react slower or faster depending on the context. the attack rate value, set by the user, can be dynamically varied through the dynamic attack rate (dar). it is a parameter (expressed in ms/db) acting as a weighted coefficient, multiplying the difference between the attenuator output signal and the mapper target level. the dynamic attack rate affects the user-programmed attack rate according to the following equations: the dar is user-definable and its range of values is [0, +1) ms/db, ( ta b l e 1 2 ) with a 0.0039 ms/db step. the dar is the same for all 4 sub-bands. attacktime outputsignallevel mapperlevel ? attackrate -------------------------------------------------------------------------------------------------- - = releasetime outputsignallevel mapperlevel ? releaserate -------------------------------------------------------------------------------------------------- - = dynamicattacktime out putsignallevel mapperlevel ? () dar = attacktime outputsignallevel mapperlevel ? attackrate -------------------------------------------------------------------------------------------------- - dynamicattacktime + = attackrate ? outputsignallevel mapperlevel ? attacktime dynamicattacktime ? -------------------------------------------------------------------------------------------------- - =
device overview STA381BW 34/171 doc id 018835 rev 7 4.3.7 offset the offset is a user-selectable gain or volume control. when using the stc it is advised to use the offset to tune the output volume instead of the regular volume controls. the offset is located before the attenuator block, ensuring that the output power limit (limiter threshold) is never exceeded ( figure 12 ). on the other side, the traditional volume control is located after the stc attenuator, thus a wrong setting of this control could nullify the stc effect. each sub-band has its own and independent offset. its range is [0, +48] db with a 0.25 db step ( ta bl e 1 2 ). figure 12. offset effect 4.3.8 stereo link the stereo link feature allows applying the same attenuation to the corresponding band of each channel (i.e. band 0 left channel and band 0 right or band 1 left channel and band 1 right channel). this should help to prevent image shifting that could occur when individually compressing each channel and causing a volume mismatch between left and right. when the stereo link is active, the proper attenuation for each band is independently computed, then the highest one for each band is applied ( figure 13 ).
STA381BW device overview doc id 018835 rev 7 35/171 figure 13. stereo link block diagram 4.3.9 programming of coefficients the coefficients are expressed in different value ranges and in decimal notation (refer to the previous paragraphs). in order to be programmed they must be converted into a [-1, +1) range and in hexadecimal notation ( ta b l e 1 1 ). this can be achieved with the following procedure: if coeffdecvalue>0 if coeffdecvalue<0 where coeffi2cvalue is the final decimal value to be converted into hexadecimal notation while coeffdecvalue is the coefficient value (in decimal notation) to start from. + o u tp u t ch 0 atten ua tor from m a pper ch 0 ? b a nd 0 atten ua tor from m a pper ch 0 ? b a nd 1 atten ua tor atten ua tor x x ch 0 ? b a nd 1 ch 0 ? b a nd 0 + o u tp u t ch 1 atten ua tor from m a pper ch 1 ? b a nd 0 atten ua tor from m a pper ch 1 ? b a nd 1 atten ua tor atten ua tor x x ch 1 ? b a nd 1 ch 1 ? b a nd 0 m a x atten ua tion b a nd 0 m a x atten ua tion b a nd 1 coeffi2cvalue rnd coeffdecvalue 2 6 ? () 2 23 () = coeffi2cvalue 2 24 rnd coeffdecvalue 2 6 ? () 2 23 () ? =
device overview STA381BW 36/171 doc id 018835 rev 7 table 11. conversion example original value (dec) i 2 c value (hex) +48.00 0x600000 +24.00 0x300000 +16.00 0x200000 +12.00 0x180000 +06.00 0x0c0000 +02.00 0x040000 +01.00 0x020000 -01.00 0xfe0000 -02.00 0xfc0000 -06.00 0xf40000 -12.00 0xe80000 -24.00 0xd00000 -48.00 0xa00000
STA381BW device overview doc id 018835 rev 7 37/171 4.3.10 memory map all the control parameters listed in the previous paragraphs are stored in the internal device memory. please refer to ta b l e 1 2 and ta bl e 1 3 for a complete list of their addresses. for the programming procedure please refer to section 6.24: user-defined coefficient control registers (addr 0x27 - 0x37) . be aware that the read-all operation is not available for the stc coefficients memory. table 12. stc coefficients memory map function address parameter range precision unit default ch0 band 0 drc 0 0x54 rr: release rate [0.0078,1) 0.0039 db/ms 0x200000 0x55 ar: attack rate [0,16] 0.25 db/ms 0x200000 0x56 lt: limiter threshol d [-24, +12] 0.25 db 0x000000 0x57 cr: compressor ratio [0,15] 1 index 0x000000 0x58 ct: compressor threshold [-48, 0] 0.25 db 0x000000 band 1 drc 1 0x59 rr: release rate [0.0078,1) 0.0039 db/ms 0x200000 05a ar: attack rate [0,16] 0.25 db/ms 0x200000 0x5b lt: limiter threshol d [-24, +12] 0.25 db 0x000000 0x5c cr: compressor ratio [0,15] 1 index 0x000000 0x5d ct: compressor threshold [-48, 0] 0.25 db 0x000000 ch1 band 0 drc 2 0x5e rr: release rate [0.0078,1) 0.0039 db/ms 0x200000 0x5f ar: attack rate [0,16] 0.25 db/ms 0x200000 0x60 lt: limiter threshol d [-24, +12] 0.25 db 0x000000 0x61 cr: compressor ratio [0,15] 1 index 0x000000 0x62 ct: compressor threshold [-48, 0] 0.25 db 0x000000 band 1 drc 3 0x63 rr: release rate [0.0078,1) 0.0039 db/ms 0x200000 0x64 ar: attack rate [0,16] 0.25 db/ms 0x200000 0x65 lt: limiter threshol d [-24, +12] 0.25 db 0x000000 0x66 cr: compressor ratio [0,15] 1 index 0x000000 0x67 ct: compressor threshold [-48, 0] 0.25 db 0x000000 offset 0x68 ofs0: offset drc 0 [0, +48] 0.25 db 0x000000 0x69 ofs1: offset drc 1 [0, +48] 0.25 db 0x000000 0x6a ofs2: offset drc 2 [0, +48] 0.25 db 0x000000 0x6b ofs3: offset drc 3 [0, +48] 0.25 db 0x000000 dynamic attack rate 0x71 dar: dynamic attack rate [0, 1) 0.0039 ms/db 0x000000 crc expected 0x72 crc computed 0x73 biquads ctrl 0x74 band splitter filter coefficients range 0x0000aa
device overview STA381BW 38/171 doc id 018835 rev 7 table 13. stc band splitter filters memory map function address coefficient range default band 0 bq0 0x40 b1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x41 b2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x42 -a1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x43 -a2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x44 b0/2 [-1, 1), [-2, 2), [-4, 4) 0x100000 bq1 0x45 b1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x46 b2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x47 -a1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x48 -a2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x49 b0/2 [-1, 1), [-2, 2), [-4, 4) 0x100000 band 1 bq0 0x4a b1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x4b b2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x4c -a1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x4d -a2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x4e b0/2 [-1, 1), [-2, 2), [-4, 4) 0x100000 bq1 0x4f b1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x50 b2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x51 -a1/2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x52 -a2 [-1, 1), [-2, 2), [-4, 4) 0x000000 0x53 b0/2 [-1, 1), [-2, 2), [-4, 4) 0x100000
STA381BW i 2 c bus specification doc id 018835 rev 7 39/171 5 i 2 c bus specification the STA381BW supports the i 2 c protocol via the input ports scl and sda_in (master to slave) and the output port sda_out (slave to master). this protocol defines any device that sends data on to the bus as a transmitter and any device that reads the data as a receiver. the device that controls the data transfer is known as the master and the other as the slave. the master always starts the transfer and provides the serial clock for synchronization. the STA381BW is always a slave device in all of its communications. it supports up to 400 kb/sec rate (fast-mode bit rate). the STA381BW i 2 c is a slave-only interface. the i 2 c interface works properly only in the case that the master clock generated by the pll has a frequency 10 times higher compared to the frequency of the applied scl signal. 5.1 communication protocol 5.1.1 data transition or change data changes on the sda line must only occur when the scl clock is low. an sda transition while the clock is high is used to identify a start or stop condition. 5.1.2 start condition start is identified by a high-to-low transition of the data bus sda signal while the clock signal scl is stable in the high state. a start condition must precede any command for data transfer. 5.1.3 stop condition stop is identified by a low-to-high transition of the data bus sda signal while the clock signal scl is stable in the high state. a stop condition terminates communication between the STA381BW and the bus master. 5.1.4 data input during the data input the STA381BW samples the sda signal on the rising edge of clock scl. for correct device operation, the sda signal must be stable during the rising edge of the clock and the data can change only when the scl line is low. 5.2 device addressing to start communication between the master and the STA381BW, the master must initiate with a start condition. following this, the master sends to the sda line 8 bits (msb first) corresponding to the device select address and read or write mode. the seven most significant bits are the device address identifiers, corresponding to the i 2 c bus definition. in the STA381BW the i 2 c interface has two device addresses depending on the sa port configuration, 0x38 when sa = 0, and 0x3a when sa = 1. the eighth bit (lsb) identifies read or write operation rw, this bit is set to 1 for read mode and to 0 for write mode. after a start condition the STA381BW identifies on the bus the device address and if a match is found, it acknowledges the identification on sda bus during
i 2 c bus specification STA381BW 40/171 doc id 018835 rev 7 the 9th bit time. the byte following the device identification byte is the internal space address. 5.3 write operation following the start condition, the master send s a device select code with the rw bit set to 0. the STA381BW acknowledges this and then waits for the byte of the internal address. after receiving the internal byte address the STA381BW again responds with an acknowledgement. 5.3.1 byte write in the byte write mode the master sends one data byte which is acknowledged by the STA381BW. the master then terminates the transfer by generating a stop condition. 5.3.2 multi-byte write the multi-byte write mode can start from any internal address. the master generating a stop condition terminates the transfer. 5.4 read operation 5.4.1 current address byte read following the start condition, the master send s a device select code with the rw bit set to 1. the STA381BW acknowledges this and then responds by sending one byte of data. the master then terminates the transfer by generating a stop condition. 5.4.2 current address multi-byte read the multi-byte read modes can start from any internal address. sequential data bytes are read from sequential addresses within the STA381BW. the master acknowledges each data byte read and then generates a stop condition, terminating the transfer. 5.4.3 random ad dress byte read following the start condition, the master send s a device select code with the rw bit set to 0. the STA381BW acknowledges this and then the master writes the internal address byte. after receiving the internal byte address, the STA381BW again responds with an acknowledgement. the master then initiates another start condition and sends the device select code with the rw bit set to 1. the STA381BW acknowledges this and then responds by sending one byte of data. the master then terminates the transfer by generating a stop condition. 5.4.4 random address multi-byte read the multi-byte read mode can start from any internal address. sequential data bytes are read from sequential addresses within the STA381BW. the master acknowledges each data byte read and then generates a stop condition, terminating the transfer.
STA381BW i 2 c bus specification doc id 018835 rev 7 41/171 5.4.5 write mode sequence figure 14. write mode sequence 5.4.6 read mode sequence figure 15. read mode sequence dev-addr ack s tart rw s ub-addr ack data in ack s top byte write dev-addr ack s tart rw s ub-addr ack data in ack s top multibyte write data in ack dev-addr ack s tart rw s ub-addr ack data in ack s top byte write dev-addr ack s tart rw s ub-addr ack data in ack s top multibyte write data in ack dev-addr ack s tart rw data no ack s top current addre ss read dev-addr ack s tart rw s ub-addr ack dev-addr ack s top random addre ss read data no ack w r t r a t s dev-addr ack s tart data ack data ack s top s equential current read data no ack dev-addr ack s tart rw s ub-addr ack dev-addr ack s equential random read data ack w r t r a t s data ack no ack s top data rw= high dev-addr ack s tart rw data no ack s top current addre ss read dev-addr ack s tart rw s ub-addr ack dev-addr ack s top random addre ss read data no ack w r t r a t s dev-addr ack s tart data ack data ack s top s equential current read data no ack dev-addr ack s tart rw s ub-addr ack dev-addr ack s equential random read data ack w r t r a t s data ack no ack s top data rw= high
register description: new map STA381BW 42/171 doc id 018835 rev 7 6 register description: new map mapping of two registers is available on the STA381BW, the selection is done by setting register 0x7e bit d7. by default, 0x7e is set to 1 and refers to a map that is not compatible with previous sound terminal devices. this register?s mapping is also called ?new map?. to keep compatibility with previo us sound terminal devices, 0x7e bit d7 must be set to 0 after device turn-on and after any reset (via sw or via external pin). please refer to section 7: register description : sound terminal compatibility for all the information about device compatibility. missing addresses are to be considered as reserved. table 14. default register map table: new map addr name d7 d6 d5 d4 d3 d2 d1 d0 0x00 clk clk_cfg[3:0] i2s 0x01 status fault drccrc eqcrc badpwm i2serr pllul 0x02 reset sreset 0x03 svol svol[1:0] 0x04 mvol mvol[7:0] 0x05 finevol fine[1:0] 0x06 ch1vol ch1vol[7:0] 0x07 ch2vol ch2vol[7:0] 0x08 post post[7:0] 0x09 oper oper[1:0] 0x0a funct crc apeq peq amdrc mdrce drc 0x10 hpcfg mute 0x11 confa fdrb ir1 ir0 mcs2 mcs1 mcs0 0x12 confb c2im c1im dscke saifb sai3 sai2 sai1 sai0 0x13 confc csz3 csz2 csz1 csz0 0x14 confd sme zde bql psl dspb 0x15 confe zce pwms ame nsbw 0x16 conff eapd pwdn ldte bcle ide 0x17 muteloc loc1 loc0 c3m c2m c1m mmute 0x1b ch3vol ch3vol[7:0] 0x1d auto xo3 xo2 xo1 xo0 amam2 amam1 amam0 amame 0x1f c1cfg c1bo c1vbp c1eqbp c1tcb 0x20 c2cfg c2bo c2vbp c2eqbp c2tcb 0x21 c3cfg c3om1 c3om0 c3ls1 c3ls0 c3bo c3vbp 0x22 tone ttc3 ttc2 ttc1 ttc0 btc3 btc2 btc1 btc0 0x23 l1ar l1a3 l1a2 l1a1 l1a0 l1r3 l1r2 l1r1 l1r0 0x24 l1atrt l1at3 l1at2 l1at1 l1at0 l1rt3 l1rt2 l1rt1 l1rt0
STA381BW register description: new map doc id 018835 rev 7 43/171 0x25 l2ar l2a3 l2a2 l2a1 l2a0 l2r3 l2r2 l2r1 l2r0 0x26 l2atrt l2at3 l2at2 l2at1 l2at0 l2rt3 l2rt2 l2rt1 l2rt0 0x27 cfaddr cfa5 cfa4 cfa3 cfa2 cfa1 cfa0 0x28 b1cf1 c1b23 c1b22 c1b21 c1b20 c1b19 c1b18 c1b17 c1b16 0x29 b1cf2 c1b15 c1b14 c1b13 c1b12 c1b11 c1b10 c1b9 c1b8 0x2a b1cf3 c1b7 c1b6 c1b5 c1b4 c1b3 c1b2 c1b1 c1b0 0x2b b2cf1 c2b23 c2b22 c2b21 c2b20 c2b19 c2b18 c2b17 c2b16 0x2c b2cf2 c2b15 c2b14 c2b13 c2b12 c2b11 c2b10 c2b9 c2b8 0x2d b2cf3 c2b7 c2b6 c2b5 c2b4 c2b3 c2b2 c2b1 c2b0 0x2e a1cf1 c3b23 c3b22 c3b21 c3b20 c3b19 c3b18 c3b17 c3b16 0x2f a1cf2 c3b15 c3b14 c3b13 c3b12 c3b11 c3b10 c3b9 c3b8 0x30 a1cf3 c3b7 c3b6 c3b5 c3b4 c3b3 c3b2 c3b1 c3b0 0x31 a2cf1 c4b23 c4b22 c4b21 c4b20 c4b19 c4b18 c4b17 c4b16 0x32 a2cf2 c4b15 c4b14 c4b13 c4b12 c4b11 c4b10 c4b9 c4b8 0x33 a2cf3 c4b7 c4b6 c4b5 c4b4 c4b3 c4b2 c4b1 c4b0 0x34 b0cf1 c5b23 c5b22 c5b21 c5b20 c5b19 c5b18 c5b17 c5b16 0x35 b0cf2 c5b15 c5b14 c5b13 c5b12 c5b11 c5b10 c5b9 c5b8 0x36 b0cf3 c5b7 c5b6 c5b5 c5b4 c5b3 c5b2 c5b1 c5b0 0x37 cfud ra r1 wa w1 0x3c fdrc1 fdrc15 fdrc14 fdrc13 fdrc12 fdrc11 fdrc10 fdrc9 fdrc8 0x3d fdrc2 fdrc7 fdrc6 fdrc5 fdrc4 fdrc3 fdrc2 fdrc1 fdrc0 0x3f mth2 mth[21:16] 0x40 mth1 mth[15:8] 0x43 eath1 eathen1 eath1[6:0] 0x44 erth1 erthen1 erth1[6:0] 0x45 eath2 eathen2 eath2[6:0] 0x46 erth2 erthen2 erth2[6:0] 0x47 confx ps48db xar1 xar2 bq5 bq6 bq7 0x52 pllfrac1 pll_frac[15:8] 0x53 pllfrac2 pll_frac[7:0] 0x54 plldiv pll_dith[1:0] pll_ndiv[5:0] 0x55 pllcfg0 pll_dpd pll_fct pll_stb pll_ stbbyp pll_idiv[3:0] 0x56 pllcfg1 pll_dirp pll_pwd pll_byp osc_pd boost32k 0x57 pllstate bypstate pdstate oscok lowck 0x58 shok gndsh vccsh outsh 0x5a cxt41 cext_b4[1:0] cext_b3[1:0] cext_b2[1:0] cext_b1[1:0] table 14. default register map table: new map (continued) addr name d7 d6 d5 d4 d3 d2 d1 d0
register description: new map STA381BW 44/171 doc id 018835 rev 7 0x5b cxt75 cext_b7[1:0] cext_b6[1:0] cext_b5[1:0] 0x5c misc1 rpdnen bridgoff cpwmen 0x5d misc2 lpdp lpd lpde pndlsl[2:0] shen 0x5e bpth bpth[5:0] 0x60 bptim bptim[7:0] 0x61 zccfg0 wthh wthl fineth hsel[1:0] zmth[2:0] 0x62 zccfg1 rms_ch0[7:0] 0x63 zccfg2 rms_ch0[15:8] 0x64 zccfg3 rms_ch1[7:0] 0x65 zccfg4 rms_ch1[15:8] 0x66 hpcfg hpln cpfen cpok abfault dcrok 0x69 f3xcfg1 f3xlnk 0x6a f3xcfg2 f3x_fault f3x_sm_slope[2:0] f3x_mute f3x_ena 0x6b stccfg0 np_ crcres 0x6c stccfg1 stc_lnk 0x6f mth0 mth[7:0] 0x70 chpsinc chpi initcnt[3:0] chprd 0x71 bqchke0 bq_cke[7:0] 0x72 bqchke1 bq_cke[15:8] 0x73 bqchke2 bq_cke[23:16] 0x74 xcchke0 xc_cke[7:0] 0x75 xcchke1 xc_cke[15:8] 0x76 xcchke2 xc_cke[23:16] 0x77 bqchkr0 bq_ckr[7:0] 0x78 bqchkr1 bq_ckr[15:8] 0x79 bqchkr2 bq_ckr[23:16] 0x7a xcchkr0 xc_ckr[7:0] 0x7b xcchkr1 xc_ckr[15:8] 0x7c xcchkr2 xc_ckr[23:16] 0x7d chkctrl xcauto bcauto 0x7e misc4 smap wra ch12 table 14. default register map table: new map (continued) addr name d7 d6 d5 d4 d3 d2 d1 d0
STA381BW register description: new map doc id 018835 rev 7 45/171 6.1 clk register (addr 0x00) table 15. clk register 6.2 status register (addr 0x01) d7 d6 d5 d4 d3 d2 d1 d0 clk_cfg[3:0] reserved reserved reserved i2s 00000000 bit r/w rst name description 7r/w 0 clk_cfg[3:0] 0000: 44.1/48 khz bitclk = 64 fs 0001: 32 khz bitclk = 64 fs 0010: 96 khz bitclk = 64 fs 0011: 48/44.1/32 khz mck = 256 fs others: clock configuration depends on ir/mcs bits 6r/w 0 5r/w 0 4r/w 0 0r/w 0 i2s ?0? = sai configured in i 2 s mode ?1? = sai configuration depends on confb register status d7 d6 d5 d4 d3 d2 d1 d0 fault drccrc eqcrc badpwm reserved reserved i2serr pllul na na na na na na na na table 16. status register bit r/w rst name description 7r fault (1) 1. fault status is set to 1 once the power bridge goes to tri-state mode. ?0? = the power bridge is in fault condition ?1? = the power bridge is in normal condition 6 r drccrc ?0? = normal operation ?1? = crc error on drc biquads 5 r eqcrc ?0? = normal operation ?1? = crc error on biquads 4r badpwm ?0? = normal operation ?1? = pwm outputs are invalid 1 r i2serr ?0? = normal operation ?1? = sai interface error detected (see section 6.14: configuration register b (addr 0x12) ) 0 r pllul ?0? = pll is locked ?1? = pll is not locked
register description: new map STA381BW 46/171 doc id 018835 rev 7 6.3 reset register (addr 0x02) after sreset is written, the la st ic acknowledge is skipped and the eapd bit (reg 0x16 bit d7) is set to 1 instead of the 0 default value obtained after hardware reset. 6.4 soft volume register (addr 0x03) values are specified for fs = 48 khz, 96 khz or 192 khz. d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved reserved reserved sreset 00000000 table 17. reset register bit r/w rst name description 0 r/w 0 sreset ?0?: normal operation ?1?: reset the device d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved reserved svol[1:0] 00000001 table 18. soft volume register bit r/w rst name description 1r/w svol[1:0] 00: 30 ms 01: 100 ms (default) 10: 100 ms 11: soft-mute disabled 0r/w
STA381BW register description: new map doc id 018835 rev 7 47/171 6.5 mvol register (addr 0x04) 6.6 finevol register (addr 0x05) d7 d6 d5 d4 d3 d2 d1 d0 mvol[7:0] 00000000 table 19. master volume register bit r/w rst name description 7r/w 0 mvol[7:0] 0x00: hard mute (immediate switchoff) 0x01: mute 0x02: mute (pwm on) 0x03: mute (pwm on) others: volume = [(mvol-255)/2] db (1) 1. if the volume is below -60 db, the level will be approximated to 1 db step. 6r/w 0 5r/w 0 4r/w 0 3r/w 0 2r/w 0 1r/w 0 0r/w 0 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved reserved fine[1:0] 00000000 table 20. fine volume register bit r/w rst name description 1r/w fine[1:0] 00 = 0 db 01 = -0.125 db 10 = -0.25 db 11 = -0.375 db 0r/w
register description: new map STA381BW 48/171 doc id 018835 rev 7 6.7 ch1vol register (addr 0x06) table 21. channel 1 volume register 6.8 ch2vol register (addr 0x07) d7 d6 d5 d4 d3 d2 d1 d0 ch1vol[7:0] 10011111 bit r/w rst name description 7r/w 1 ch1vol[7:0] 0x00: mute others: volume = [(ch1vol-159)/2] db (1) 1. if the volume is below -60 db, the level will be approximated to 1 db step. 6r/w 0 5r/w 0 4r/w 1 3r/w 1 2r/w 1 1r/w 1 0r/w 1 d7 d6 d5 d4 d3 d2 d1 d0 ch2vol[7:0] 10011111 table 22. channel 2 volume register bit r/w rst name description 7r/w 1 ch2vol[7:0] 0x00: mute others: volume = [(ch2vol-159)/2] db (1) 1. if the volume is below -60 db, the level will be approximated to 1 db step. 6r/w 0 5r/w 0 4r/w 1 3r/w 1 2r/w 1 1r/w 1 0r/w 1
STA381BW register description: new map doc id 018835 rev 7 49/171 6.9 post scaler register (addr 0x08) post scaler is set to post/128 for both ch1 and ch2. 6.10 oper register (addr 0x09) d7 d6 d5 d4 d3 d2 d1 d0 post[7:0] 10000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved reserved oper[1:0] 00000000 table 23. oper register bit r/w rst name description 1r/w 0 oper[1:0] output configuration modes 0r/w 0 table 24. oper configuration selection oper[1:0] output conf iguration pbtl enable 00 2-channel (full-bridge) power, 2-channel data-out: 1a/1b 1a/1b 2a/2b 2a/2b lineout1 3a/3b lineout2 4a/4b line out configuration determined by loc register no 11 2-channel (full-bridge) power, 1-channel ffx: 1a/1b 1a/1b 2a/2b 2a/2b 3a/3b 3a/3b eapdext and twarnext active ye s 10 2(half-bridge).1(full-bridge) on-board power: 1a 1a binary 0 2a 1b binary 90 3a/3b 2a/2b binary 45 1a/b 3a/b binary 0 2a/b 4a/b binary 90 no 01 1 channel mono-parallel: 3a 1a/1b w/ c3bo 45 3b 2a/2b w/ c3bo 45 1a/1b 3a/3b 2a/2b 4a/4b ch3 downmixed on all the pwm channels. no
register description: new map STA381BW 50/171 doc id 018835 rev 7 figure 16. oper = 00 (default value) figure 17. oper = 11 figure 18. oper = 10 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 lpf lineo u t1 out 3 b lpf lineo u t2 out4b out4a out 3 a h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 lpf lineo u t1 out 3 b lpf lineo u t2 out4b out4a out 3 a h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 ch a nnel 1 ch a nnel 2 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 ch a nnel 1 ch a nnel 2 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 power device out 3 b out 3 a eapd ch a nnel 3 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 power device out 3 b out 3 a eapd ch a nnel 3
STA381BW register description: new map doc id 018835 rev 7 51/171 figure 19. oper = 01 the STA381BW can be configured to support different output configurations. for each pwm output channel, a pwm slot is defined. a pwm sl ot is always 1 / (8 * fs) seconds length. the pwm slot defines the maximum extension for the pwm rising and falling edge, that is, the rising edge as well as the falling edge ca nnot range outside th e pwm slot boundaries. figure 20. output mapping scheme h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 out 3 b out4b out4a out 3 a ch a nnel 1 ch a nnel 2 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 out 3 b out4b out4a out 3 a ch a nnel 1 ch a nnel 2 ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b tm
register description: new map STA381BW 52/171 doc id 018835 rev 7 for each configuration the pwm signals from the digital driver are mapped in different ways to the power stage. 2.0 channels, two full-bridges ( oper = 00) ffx1a -> out1a ffx1b -> out1b ffx2a -> out2a ffx2b -> out2b ffx3a -> out3a ffx3b -> out3b ffx4a -> out4a ffx4b -> out4b ffx1a/1b configured as ternary ffx2a/2b configured as ternary ffx3a/3b configured as line out ternary ffx4a/4b configured as line out ternary on channel 3 line out (loc bits = 00, reg 0x17 bit d7,d6) the same data as channel 1 processing is sent. on channel 4 line out (loc bits = 00) the same data as channel 2 processing is sent. in this configuration, neither volume control nor eq has any effect on channels 3 and 4. in this configuration the pwm slot phase is the following as shown in figure 21 . figure 21. 2.0 channels (oper = 00) pwm slots out1a out1b out2a out2b out 3 a out 3 b out4a out4b out1a out1b out2a out2b out 3 a out 3 b out4a out4b
STA381BW register description: new map doc id 018835 rev 7 53/171 2.1 channels, two half-bridges + one full-bridge ( oper = 11) ffx1a -> out1a ffx2a -> out1b ffx3a -> out2a ffx3b -> out2b ffx1a -> out3a ffx1b -> out3b ffx2a -> out4a ffx2b -> out4b ffx1a/1b configured as binary ffx2a/2b configured as binary ffx3a/3b configured as binary ffx4a/4b is not used in this configuration, channel 3 has full control (volume, eq, etc?). on out3/out4 channels, channel 1 and channel 2 pwm are replicated. in this configuration the pwm slot phase is the following as shown in figure 22 . figure 22. 2.1 channels (oper = 11) pwm slots out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out4a out4b
register description: new map STA381BW 54/171 doc id 018835 rev 7 2.1 channels, two full-bridges + one external full-bridge ( oper = 10) ffx1a -> out1a ffx1b -> out1b ffx2a -> out2a ffx2b -> out2b ffx3a -> out3a ffx3b -> out3b eapd -> out4a twarn -> out4b ffx1a/1b configured as ternary ffx2a/2b configured as ternary ffx3a/3b configured as ternary ffx4a/4b is not used in this configuration, channel 3 has full control (volume, eq, etc?). on out4 channel the external bridge control signals are muxed. in this configuration the pwm slot phase is the following as shown in figure 23 . figure 23. 2.1 channels (oper = 10) pwm slots out1a out1b out2a out2b out 3 a out 3 b out1a out1b out2a out2b out 3 a out 3 b out1a out1b out2a out2b out 3 a out 3 b out1a out1b out2a out2b out 3 a out 3 b
STA381BW register description: new map doc id 018835 rev 7 55/171 6.11 funct register (addr 0x0a) 6.11.1 dual-band drc the STA381BW device provides a dual-band drc (b 2 drc) on the left an d right channels data path, as depicted in figure 24 . dual-band drc is activated by setting mdrce = 1. figure 24. b 2 drc scheme the low-frequency information (lfe) is extracted from the left and right channels, removing the high frequencies using a programmable biquad filter, and then computing the difference d7 d6 d5 d4 d3 d2 d1 d0 reserved crc apeq peq reserved amdrc mdrce drc 00100000 table 25. funct register bit r/w rst name description 6r/w 0 crc ?0?: disable crc computation and comparison ?1?: enable crc computation and comparison 5 r/w 1 apeq ?0?: extended bq disabled, 8th biquadratic filter disabled ?1?: extended bq enabled, 8th biquadratic filter enabled 4 r/w 0 peq ?0?: normal operation ?1?: peq disabled, disables all biquadratic filters 2 r/w 0 amdrc ?0?: stcompressor bypassed ?1?: stcompressor enabled 1 r/w 0 mdrce ?0?: mdrce bypassed ?1?: mdrce enabled 0r/w 0 drc ?0?: drc disabled ?1?: drc enabled b 2 drc hi-p ass xo filter l r b 2 drc hi-p ass xo filter - ch a nnel 1 vol u me drc 1 ch a nnel 3 vo l u me drc 2 ++ - + ch a nnel 3 vol u me drc 2 ch a nnel 2 vo l u me drc 1 +
register description: new map STA381BW 56/171 doc id 018835 rev 7 with the original signal. limiter 1 (drc1) is then used to control the amplitude of the left/right high-frequency components, while limiter 2 (drc2) is used to control the low- frequency components (see section 6.23: dynamic control registers (addr 0x23 - 0x26 / addr 0x43 - 0x46) ). the cutoff frequency of the high-pass filters can be user-defined, xo[3:0] = 0, or selected from the pre-defined values. drc1 and drc2 are then used to independentl y limit l/r high frequencies and lfe channel amplitude (see section 6.23: dynamic control registers (addr 0x23 - 0x26 / addr 0x43 - 0x46) ) as well as their volume control. to be noted that, in this configuration, the dedicated channel 3 volume control can actually act as a bass boost enhancer as well (0.5 db/step resolution). the processed lfe channel is then recombined with the l and r channels in order to reconstruct the 2.0 output signal. sub-band decomposition the sub-band decomposition for b 2 drc can be configured specifying the cutoff frequency. the cutoff frequency can be programmed in two ways, using the xo bits in register 0x0c, or using the ?user programmable? mode (coefficients stored in ram addresses 0x28 to 0x31). for the user-programmable mode, use the formulas below to compute the high-pass filters: where alpha = (1-sin( 0 ))/cos( 0 ), and 0 is the cutoff frequency. a first-order filter is recommended to guarantee that for every 0 the corresponding low-pass filter obtained as difference (as shown in figure 24 ) will have a symmetric (relative to the hp filter) frequency response, and the corresponding recombination after the drc has low ripple. second-order filters can be used as well, but in this case the filter shape must be carefully chosen to provide good low-pass response and minimum ripple recombination. for second-order filters, it is not possible to give a closed formula to get the best coefficients, but empirical adjustment should be done. drc settings the drc blocks used by b 2 drc are the same as those described in section 6.23: dynamic control registers (addr 0x23 - 0x26 / addr 0x43 - 0x46) . b 2 drc configure automatically the drc blocks in anticlipping mode. attack and release thresholds can be selected using registers 0x32, 0x33, 0x34, 0x35, while attack and release rates are configured by registers 0x12 and 0x14. band downmixing the low-frequency band is down-mixed to the left and right channels at the b 2 drc output. channel volume can be used to weight the bands recombination to fine-tune the overall frequency response. b0 = (1 + alpha) / 2 a0 = 1 b1 = -(1 + alpha) / 2 a1 = -alpha b2 = 0 a2 = 0
STA381BW register description: new map doc id 018835 rev 7 57/171 6.12 hpcfg register (addr 0x10) 6.13 configuration register a (addr 0x11) 6.13.1 master clock select the STA381BW supports sampling rates of 32 khz, 44.1 khz, 48 khz, 88.2 khz, 96 khz, 176.4 khz, and 192 khz. therefore the internal clock is: 32.768 mhz for 32 khz 45.1584 mhz for 44.1 khz, 88.2 khz, and 176.4 khz 49.152 mhz for 48 khz, 96 khz, and 192 khz the external clock frequency provided to the xti pin or bicki pin (depending on the mcs settings) must be a multiple of the input sampling frequency (f s ). the relationship between the input clock (either xti or bicki) and the input sampling rate is determined by both the mcsx and the ir (input rate) register bits. the mcsx bits determine the pll factor generating the internal clock and the ir bit determines the oversampling ratio used internally. in ta b l e 2 8 mcs 111 and 110 indicate that bicki has to be used as the clock source, while xti is used in all the other cases. d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved reserved reserved mute 00000001 table 26. hpcfg register bit r/w rst name description 0r/w 1 mute ?0?: hp/line out is on ?1?: hp/line out is muted d7 d6 d5 d4 d3 d2 d1 d0 fdrb reserved reserved ir1 ir0 mcs2 mcs1 mcs0 01100111 table 27. master clock select bit r/w rst name description 0r/w 1 mcs0 selects the ratio between the input i 2 s sampling frequency and the input clock. 1r/w 1 mcs1 2r/w 1 mcs2
register description: new map STA381BW 58/171 doc id 018835 rev 7 note: (*): clock is bicki 6.13.2 interpolation ratio selection the STA381BW has variable interpolation (oversampling) settings such that internal processing and ffx output rates remain consis tent. the first processing block interpolates by either 3 times ( table 83: pll register 0x56 bits d0), 2 times or 1 time (pass-through) or provides a 2-times downsample. the oversamplin g ratio of this interpolation is determined by the ir bits. 6.13.3 fault-detect recovery bypass table 28. input sampling rates input sampling rate fs (khz) ir mcs[2:0] 111 110 101 100 011 010 001 000 32, 44.1, 48 00 64*fs(*) na 576 * fs 128 * fs 256 * fs 384 * fs 512 * fs 768 * fs 88.2, 96 01 64*fs(*) 32*fs(*) na 64 * fs 128 * fs 192 * fs 256 * fs 384 * fs 176.4, 192 1x 64*fs(*) 32*fs(*) na 32 * fs 64 * fs 96 * fs 128 * fs 192 * fs table 29. internal interpolation ratio bit r/w rst name description 4:3 r/w 00 ir [1:0] selects internal interpolation ratio based on input i 2 s sampling frequency table 30. ir bit settings as a function of the input sampling rate input sampling rate fs (khz) ir 1st stage interpolation ratio 32 00 2-times oversampling 44.1 00 2-times oversampling 48 00 2-times oversampling 88.2 01 pass-through 96 01 pass-through 176.4 10 2-times downsampling 192 10 2-times downsampling table 31. fault-detect recovery bypass bit r/w rst name description 7r/w 0 fdrb 0: fault-detect recovery enabled 1: fault-detect recovery disabled
STA381BW register description: new map doc id 018835 rev 7 59/171 the on-chip STA381BW power output block provides feedback to the digital controller using inputs to the power control block. the fault input is used to indicate a fault condition (either overcurrent or thermal). when fault is asserted (set to 0), the power control block attempts a recovery from the fault by asserting the tri-state output (setting it to 0 which directs the power output block to begin recovery), holds it at 0 for period of time in the range of 0.1 ms to 1 second as defined by the fault-detect recovery constant register (fdrc registers 0x3c- 0x3d), then toggles it back to 1. this sequence is repeated as long as the fault indication exists. this feature is enabled by default but can be bypassed by setting the fdrb control bit to 1. 6.14 configuration register b (addr 0x12) 6.14.1 serial data interface the STA381BW audio serial input was designed to interface with standard digital audio components and to accept a number of serial data formats. the STA381BW always acts as the slave when receiving audio input from standard digital audio components. serial data for two channels is provided using three inputs: left/right clock lrcki, serial clock bicki, and serial data 1 and 2 sdi12. the sai bits (d3 to d0) and the saifb bit (d4) are used to specify the serial data format. the default serial data format is i 2 s, msb-first. available formats are shown in the tables that follow. d7 d6 d5 d4 d3 d2 d1 d0 c2im c1im dscke saifb sai3 sai2 sai1 sai0 10000000
register description: new map STA381BW 60/171 doc id 018835 rev 7 6.14.2 serial data first bit table 32. serial data first bit saifb format 0 msb-first 1 lsb-first table 33. support serial audio input formats for msb-first (saifb = 0) bicki sai [3:0] saifb interface format 32 * fs 0000 0 i 2 s 15-bit data 0001 0 left/right-justified 16-bit data 48 * fs 0000 0 i 2 s 16- to 23-bit data 0001 0 left-justified 16- to 24-bit data 0010 0 right-justified 24-bit data 0110 0 right-justified 20-bit data 1010 0 right-justified 18-bit data 1110 0 right-justified 16-bit data 64 * fs 0000 0 i 2 s 16- to 24-bit data 0001 0 left-justified 16- to 24-bit data 0010 0 right-justified 24-bit data 0110 0 right-justified 20-bit data 1010 0 right-justified 18-bit data 1110 0 right-justified 16-bit data
STA381BW register description: new map doc id 018835 rev 7 61/171 table 34. supported serial audio input formats for lsb-first (saifb = 1) to make the STA381BW work properly, the serial audio interface lrcki clock must be synchronous to the pll output clock. it means that: the frequency of pll clock / frequency of lrcki = n 4 cycles, where n depends on the settings in ta bl e 3 0 the pll must be locked. if these two conditions are not met, and the ide bit (reg 0x05 bit 2) is set to 1, the STA381BW will immediately mute the i 2 s pcm data out (provided to the processing block) and it will freeze any active processing task. bicki sai [3:0] saifb interface format 32 * fs 1100 1 i 2 s 15-bit data 1110 1 left/right-justified 16-bit data 48 * fs 0100 1 i 2 s 23-bit data 0100 1 i 2 s 20-bit data 1000 1 i 2 s 18-bit data 1100 1 lsb first i 2 s 16-bit data 0001 1 left-justified 24-bit data 0101 1 left-justified 20-bit data 1001 1 left-justified 18-bit data 1101 1 left-justified 16-bit data 0010 1 right-justified 24-bit data 0110 1 right-justified 20-bit data 1010 1 right-justified 18-bit data 1110 1 right-justified 16-bit data 64 * fs 0000 1 i 2 s 24-bit data 0100 1 i 2 s 20-bit data 1000 1 i 2 s 18-bit data 1100 1 lsb first i 2 s 16-bit data 0001 1 left-justified 24-bit data 0101 1 left-justified 20-bit data 1001 1 left-justified 18-bit data 1101 1 left-justified 16-bit data 0010 1 right-justified 24-bit data 0110 1 right-justified 20-bit data 1010 1 right-justified 18-bit data 1110 1 right-justified 16-bit data
register description: new map STA381BW 62/171 doc id 018835 rev 7 to avoid any audio side effects (like pop noise), it is strongly recommended to soft mute any audio streams flowing into the STA381BW data path before the desynchronization event happens. at the same time any processing related to the i 2 c configuration should be issued only after the serial audio interface and the internal pll are synchronous again. note: any mute or volume change causes some delay in the completion of the i 2 c operation due to the soft volume feature. the soft volume phase change must be finished before any clock desynchronization. 6.14.3 delay serial clock enable 6.14.4 channel input mapping each channel received via i 2 s can be mapped to any internal processing channel via the channel input mapping regi sters. this allows for flexibility in processing. the default settings of these registers map each i 2 s input channel to its corresponding processing channel. 6.15 configuration register c (addr 0x13) 6.15.1 ffx compensating pul se size register table 35. delay serial clock enable bit r/w rst name description 5r/w 0 dscke 0: no serial clock delay 1: serial clock delay by 1 core clock cycle to tolerate anomalies in some i 2 s master devices table 36. channel input mapping bit r/w rst name description 6r/w 0 c1im 0: processing channel 1 receives left i 2 s input 1: processing channel 1 receives right i 2 s input 7r/w 1 c2im 0: processing channel 2 receives left i 2 s input 1: processing channel 2 receives right i 2 s input d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved csz3 csz2 csz1 csz0 reserved reserved 10010111 table 37. ffx compensating pulse size bits bit r/w rst name description 2r/w 1 csz0 when om[1,0] = 11, this register determines the size of the ffx compensating pulse from 0 clock ticks to 15 clock periods. 3r/w 1 csz1 4r/w 1 csz2 5r/w 0 csz3
STA381BW register description: new map doc id 018835 rev 7 63/171 table 6: 6.16 configuration register d (addr 0x14) 6.16.1 dsp bypass setting the dspb bit bypasses th e eq function of the STA381BW. 6.16.2 post-scale link post-scale functionality can be used for power-supply error correction. for multi-channel applications running off the same power supply, the post-scale values can be linked to the value of channel 1 for ease of use and in order to update the values faster. 6.16.3 biquad coefficient link for ease of use, all channels can use the biquad coefficients loaded into the channel 1 coefficient ram space by setting the bql bit to 1. therefore, any eq updates only have to be performed once. table 38. compensating pulse size csz[3:0] compensating pulse size 0000 0 ns (0 ticks) compensating pulse size 0001 20 ns (1 tick) clock period compensating pulse size ?? 1111 300 ns (15 ticks) clock period compensating pulse size d7 d6 d5 d4 d3 d2 d1 d0 sme zde reserved bql psl dspb reserved reserved 00011000 table 39. dsp bypass bit r/w rst name description 2 r/w 0 dspb 0: normal operation 1: bypass of biquad and bass/treble functions table 40. post-scale link bit r/w rst name description 3 r/w 1 psl 0: each channel uses individual post-scale values 1: each channel uses channel 1 post-scale values table 41. biquad coefficient link bit r/w rst name description 4r/w 1 bql 0: each channel uses coefficient values 1: each channel uses channel 1 coefficient values
register description: new map STA381BW 64/171 doc id 018835 rev 7 6.16.4 zero-detect mute enable refer to 6.32: enhanced zero-detect mute and input level measurement (address 0x61- 0x65, 0x3f, 0x40, 0x6f) . 6.16.5 submix mode enable 6.17 configuration register e (addr 0x15) 6.17.1 noise-shaper bandwidth selection 6.17.2 am mode enable the STA381BW features an ffx processing mode that minimizes the amount of noise generated in the frequency range of am radio. this mode is intended for use when ffx is operating in a device with an active am tuner. the snr of the ffx processing is reduced to approximately 83 db in this mode, which is still greater than the snr of am radio. table 42. zero-detect mute enable bit r/w rst name description 6r/w 0 zde setting of 1 enables the automatic zero-detect mute setting of 0 disables the automatic zero-detect mute table 43. submix mode enable bit r/w rst name description 7r/w 0 sme 0: submix into left/right disabled 1: submix into left/right enabled d7 d6 d5 d4 d3 d2 d1 d0 reserved zce reserved pwms ame nsbw reserved reserved 10000010 table 44. noise-shaper bandwidth selection bit r/w rst name description 2 r/w 0 nsbw 1: third order ns 0: fourth order ns table 45. am mode enable bit r/w rst name description 3r/w 0 ame 0: normal ffx operation 1: am reduction mode ffx operation
STA381BW register description: new map doc id 018835 rev 7 65/171 6.17.3 pwm speed mode 6.17.4 zero-crossing enable the zce bit enables zero-crossing adjustment. when volume is adjusted on digital zero- crossing, no clicks are audible 6.18 configuration register f (addr 0x16) 6.18.1 invalid input detect mute enable setting the ide bit enables this function, which looks at the input i 2 s data and automatically mutes if the signals are perceived as invalid. 6.18.2 binary output mode clock loss detection this bit detects loss of input mclk in binary mode and will ou tput 50% duty cycle. table 46. pwm speed mode bit r/w rst name description 4r/w 0 pwms 0: normal speed (384 khz) all channels 1: odd speed (341.3 khz) all channels. not suitable for binary btl mode. table 47. zero-crossing enable bit r/w rst name description 6r/w 0 zce ?1?: volume adjustment only occurs at digital zero-crossing ?0?: volume adjustment occur immediately d7 d6 d5 d4 d3 d2 d1 d0 eapd pwdn reserved ldte bcle ide reserved reserved 010111 table 48. invalid input detect mute enable bit r/w rst name description 2r/w 1 ide setting of 1 enables the automatic invalid input detect mute table 49. binary output mode clock loss detection bit r/w rst name description 3 r/w 1 bcle binary output mode clock loss detection enable
register description: new map STA381BW 66/171 doc id 018835 rev 7 6.18.3 lrck double trigger protection this bit actively prevents double triggering of lrclk. 6.18.4 power-down the pwdn register is used to place the ic in a low-power state. when pwdn is written as 0, the output begins a soft-mute. after the mute condition is reached, eapd is asserted to power down the power stage, then the master clock to all internal hardware except the i 2 c block is gated. this places the ic in a very low power consumption state.the register state is preserved once the device recovers from power-down. 6.18.5 external amplifier power-down the eapd register directly disables/enables the internal power circuitry. when eapd = 0, the internal power section is placed in a low-power state (disabled). this register also controls the eapd/f fx4b output pin when ocfg = 11. 6.19 volume control regi sters (addr 0x17 - 0x1b) 6.19.1 mute/line output confi guration register (addr 0x17) table 50. lrck double trigger protection bit r/w rst name description 4 r/w 1 ldte lrclk double trigger protection enable table 51. ic power-down bit r/w rst name description 7r/w 1 pwdn 0: ic power-down low-power condition 1: ic normal operation table 52. external amplifier power-down bit r/w rst name description 7 r/w 0 eapd 0: external power stage power-down active 1: normal operation d7 d6 d5 d4 d3 d2 d1 d0 loc1 loc0 reserved reserved c3m c2m c1m mmute 00000000
STA381BW register description: new map doc id 018835 rev 7 67/171 line output is only active when ocfg = 00. in this case loc determines the line output configuration. the source of the line output is always the channel 1 and 2 inputs. table 54. mute configuration table 53. line output configuration loc[1:0] line output configuration 00 line output fixed - no volume, no eq 01 line output variable - ch3 volume effects line output, no eq 10 line output variable with eq - ch3 volume effects line output 11 reserved bit r/w rst name description 3r/w 0 c3m channel 3 mute 0 - no mute condition. it is possible to set the channel volume 1 - channel 3 in hardware mute 2r/w 0 c2m channel 2 mute 0 - no mute condition. it is possible to set the channel volume 1 - channel 2 in hardware mute 1r/w 0 c1m channel 1 mute 0 - no mute condition. it is possible to set the channel volume 1 - channel 1 in hardware mute 0 r/w 0 mmute master mute 0 - normal operation 1 - all channels are in mute condition
register description: new map STA381BW 68/171 doc id 018835 rev 7 6.19.2 channel 3 / line output volume (addr 0x1b) the volume structure of the STA381BW consists of individual volume registers for each channel and a master volume register that provides an offset to each channel?s volume setting. the individual channel volumes are adjustable in 0.5 db steps from +48 db to -80 db. as an example, if ch3vol = 0x00 or +48 db and mvol= -12 db, then the total gain for channel 3 = +36 db. the master mute, when set to 1, mutes all channels at once, whereas the individual channel mute (cxm) mutes only that channel. both the master mute and the channel mutes provide a ?soft mute? with the volume ramping down to mute in 4096 samples from the maximum volume setting at the internal processing rate (approximately 96 khz). a ?hard (instantaneous) mute? can be obtained by programming a value of 0xff (255) to any channel volume register or the master volume register. when volume offsets are provided via the master volume register, any channel whose total volu me is less than -80 db is muted. all changes in volume take place at zero-crossings when zce = 1 ( section 6.17: configuration register e (addr 0x15) ) on a per-channel basis as this creates the smoothest possible volume transitions. when zce = 0, volume updates occur immediately. d7 d6 d5 d4 d3 d2 d1 d0 ch3vol 01100000 table 55. channel 3 volume as a function of ch3vol[7:0] ch3vol[7:0] volume 00000000 (0x00) +48 db 00000001 (0x01) +47.5 db 00000010 (0x02) +47 db ?? 01011111 (0x5f) +0.5 db 01100000 (0x60) 0 db 01100001 (0x61) -0.5 db ?? 11010111 (0xd7) -59.5 db 11011000 (0xd8) -60 db 11011001 (0xd9) -61 db 11011010 (0xda) -62 db ?? 11101100 (0xec) -80 db 11101101 (0xed) hard channel mute ?? 11111111 (0xff) hard channel mute
STA381BW register description: new map doc id 018835 rev 7 69/171 6.20 audio preset registers (0x1d) 6.20.1 am interference frequency switching 6.20.2 bass management crossover d7 d6 d5 d4 d3 d2 d1 d0 xo3 xo2 xo1 xo0 amam2 amam1 amam0 amame 00000000 table 56. am interference frequency switching bits bit r/w rst name description 0 r/w 0 amame audio preset am enable 0: switching frequency determined by pwms setting 1: switching frequency determined by amam settings table 57. audio preset am switching frequency selection amam[2:0] 48 khz/96 khz input fs 44.1 khz/88.2 khz input fs 000 0.535 mhz - 0.720 mhz 0.535 mhz - 0.670 mhz 001 0.721 mhz - 0.900 mhz 0.671 mhz - 0.800 mhz 010 0.901 mhz - 1.100 mhz 0.801 mhz - 1.000 mhz 011 1.101 mhz - 1.300 mhz 1.001 mhz - 1.180 mhz 100 1.301 mhz - 1.480 mhz 1.181 mhz - 1.340 mhz 101 1.481 mhz - 1.600 mhz 1.341 mhz - 1.500 mhz 110 1.601 mhz - 1.700 mhz 1.501 mhz - 1.700 mhz table 58. bass management crossover bit r/w rst name description 4r/w 0 xo0 selects the bass management crossover frequency. a 1 st -order high-pass filter (channels 1 and 2) or a 2 nd -order low-pass filter (ch annel 3) at the selected frequency is performed. 5r/w 0 xo1 6r/w 0 xo2 7r/w 0 xo3
register description: new map STA381BW 70/171 doc id 018835 rev 7 6.21 channel configuration registers (addr 0x1f - 0x21) 6.21.1 tone control bypass tone control (bass/treble) can be bypassed on a per-channel basis for channels 1 and 2. table 59. bass management crossover frequency xo[3:0] crossover frequency 0000 table 73.: ram block for biquads, mixing, scaling and bass management 0001 80 hz 0010 100 hz 0011 120 hz 0100 140 hz 0101 160 hz 0110 180 hz 0111 200 hz 1000 220 hz 1001 240 hz 1010 260 hz 1011 280 hz 1100 300 hz 1101 320 hz 1110 340 hz 1111 360 hz d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved c1bo c1vpb c1eqbp c1tcb 00000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved c2bo c2vpb c2eqbp c2tcb 01000000 d7 d6 d5 d4 d3 d2 d1 d0 c3om1 c3om0 c3ls1 c3ls0 c3bo c3vpb reserved reserved 10000000 table 60. tone control bypass cxtcb mode 0 perform tone control on channel x - normal operation 1 bypass tone control on channel x
STA381BW register description: new map doc id 018835 rev 7 71/171 6.21.2 eq bypass eq control can be bypassed on a per-channel basis for channels 1 and 2. if eq control is bypassed on a given channel, the prescale and all filters (biquads, bass, treble in any combination) are bypassed for that channel. 6.21.3 volume bypass each channel contains an individual channel volume bypass. if a particular channel has volume bypassed via the cxvbp = 1 register, then only the channel volume setting for that particular channel affects the volume setting, the master volu me setting will not affect that channel. table 62. volume bypass register 6.21.4 binary output enable registers each individual channel output can be set to output a binary pwm stream. in this mode output a of a channel is considered the positive output and output b is the negative inverse. 6.21.5 limiter select limiter selection can be made on a per-channel basis according to the channel limiter select bits. cxls bits are not considered in ca se of dual-band drc ( section 6.11.1: dual-band drc ), eq drc ( section 6.26.1: extended post-scale range ) usage. table 61. eq bypass cxeqbp mode 0 perform eq on channel x - normal operation 1 bypass eq on channel x cxvbp mode 0 normal volume operations 1 volume is bypassed table 63. binary output enable registers cxbo mode 0 ffx 3-state output - normal operation 1 binary output table 64. channel limiter mapping as a function of c3ls bits c3ls[1:0] channel limiter mapping 00 channel has limiting disabled 01 channel is mapped to limiter #1 10 channel is mapped to limiter #2
register description: new map STA381BW 72/171 doc id 018835 rev 7 6.21.6 output mapping output mapping can be performed on a per-channel basis according to the cxom channel output mapping bits. each input into the output configuration engine can receive data from any of the three processing channel outputs. . 6.22 tone control register (addr 0x22) 6.22.1 tone control table 65. channel output mapping as a function of c3om bits c3om[1:0] channel x output source from 00 channel1 01 channel 2 10 channel 3 d7 d6 d5 d4 d3 d2 d1 d0 ttc3 ttc2 ttc1 ttc0 btc3 btc2 btc1 btc0 01110111 table 66. tone control boost/cut as a function of btc and ttc bits btc[3:0]/ttc[3:0] boost/cut 0000 -12 db 0001 -12 db ?? 0111 -4 db 0110 -2 db 0111 0 db 1000 +2 db 1001 +4 db ?? 1101 +12 db 1110 +12 db 1111 +12 db
STA381BW register description: new map doc id 018835 rev 7 73/171 6.23 dynamic control registers (addr 0x23 - 0x26 / addr 0x43 - 0x46) 6.23.1 limiter 1 attack/rel ease rate (l1ar addr 0x23) 6.23.2 limiter 1 attack/relea se threshold (l1atrt addr 0x24) 6.23.3 limiter 2 attack/rel ease rate ( l2ar addr 0x25) 6.23.4 limiter 2 attack/release threshold ( l2 atrt addr 0x26) the STA381BW includes two independent limiter blocks. the purpose of the limiters is to automatically reduce the dynamic range of a recording to prevent the outputs from clipping in anticlipping mode or to actively reduce the dynamic range for a better listening environment such as a nighttime listening mode which is often needed for dvds. the two modes are selected via the drc bit in section 6.11: funct register (addr 0x0a) . each channel can be mapped to either limiter or not mapped, mean ing that the channel will clip when 0 dbfs is exceeded. each limiter looks at the present value of each channel that is mapped to it, selects the maximum absolute value of all these channels, performs the limiting algorithm on that value, and then, if needed, adjusts the gain of the mapped channels in unison. the limiter attack thresholds are determined by the lxat registers if the eathx[7] (bit d7 of register 0x43 or 0x45) bits are set to 0, else the thresholds are determined by eathx[6:0]. it is recommended in anticlipping mode to set this to 0 dbfs, which corresponds to the maximum unclipped output power of an ffx amplifier. since gain can be added digitally within the STA381BW it is possible to exceed 0 dbfs or any other lxat setting. when this occurs, the limiter, when active, automatically starts reducing the gain. the rate at which the gain is reduced when the attack threshold is exceeded is dependent upon the attack rate register setting for that limiter. gain reduction occurs on a peak-detect algorithm. setting the eathx[7] bits to 1 selects the anticlipping mode. the limiter release thresholds are determined by the lxrt registers if the erthx[7] (bit d7 of register 0x44 or 0x46) bits are set to 0, else the thresholds are determined by d7 d6 d5 d4 d3 d2 d1 d0 l1a3 l1a2 l1a1 l1a0 l1r3 l1r2 l1r1 l1r0 01101010 d7 d6 d5 d4 d3 d2 d1 d0 l1at3 l1at2 l1at1 l1at0 l1rt3 l1rt2 l1rt1 l1rt0 01101001 d7 d6 d5 d4 d3 d2 d1 d0 l2a3 l2a2 l2a1 l2a0 l2r3 l2r2 l2r1 l2r0 01101010 d7 d6 d5 d4 d3 d2 d1 d0 l2at3 l2at2 l2at1 l2at0 l2rt3 l2rt2 l2rt1 l2rt0 01101001
register description: new map STA381BW 74/171 doc id 018835 rev 7 erthx[6:0]. setting the erthx[7] bits to 1 automatically selects the anticlipping mode. the release of the limiter, when the gain is again increased, is dependent on an rms-detect algorithm. the output of the volume/limiter block is passed through an rms filter. the output of this filter is compared to the release threshold, determined by the release threshold register. when the rms filter output falls below the release threshold, the gain is again increased at a rate dependent upon the release rate register. the gain can never be increased past its set value and, therefore, the release only occurs if the limiter has already reduced the gain. the release threshold value can be used to set what is effectively a minimum dynamic range, this is helpful as overlimiting can reduce the dynamic range to virtually zero and cause program material to sound ?lifeless?. in anticlipping mode, the attack and release thresholds are set relative to full-scale. in drc mode (bit d0 reg 0x0a set to 1), the attack threshold is set relative to the maximum volume setting of the channels mapped to that limiter and the release threshold is set relative to the maximum volume setting plus the attack threshold.
STA381BW register description: new map doc id 018835 rev 7 75/171 figure 25. basic limiter and volume flow diagram table 67. limiter attack rate as a function of lxa bits table 68. limiter release rate as a function of lxr bits lxa[3:0] attack rate db/ms lxr[3:0] release rate db/ms 0000 3.1584 fast slow 0000 0.5116 fast slow 0001 2.7072 0001 0.1370 0010 2.2560 0010 0.0744 0011 1.8048 0011 0.0499 0100 1.3536 0100 0.0360 0101 0.9024 0101 0.0299 0110 0.4512 0110 0.0264 0111 0.2256 0111 0.0208 1000 0.1504 1000 0.0198 1001 0.1123 1001 0.0172 1010 0.0902 1010 0.0147 1011 0.0752 1011 0.0137 1100 0.0645 1100 0.0134 1101 0.0564 1101 0.0117 1110 0.0501 1110 0.0110 1111 0.0451 1111 0.0104 g a in + atten ua tion sa t u r a tio n rm s g a in / vol u me in p u t limiter o u tp u t
register description: new map STA381BW 76/171 doc id 018835 rev 7 anticlipping mode table 69. limiter attack threshold as a function of lxat bits (ac mode) table 70. limiter release threshold as a function of lxrt bits (ac mode) lxat[3:0] ac (db relative to fs) lxr t[3:0] ac (db relative to fs) 0000 -12 0000 - 0001 -10 0001 -29 db 0010 -8 0010 -20 db 0011 -6 0011 -16 db 0100 -4 0100 -14 db 0101 -2 0101 -12 db 0110 0 0110 -10 db 0111 +2 0111 -8 db 1000 +3 1000 -7 db 1001 +4 1001 -6 db 1010 +5 1010 -5 db 1011 +6 1011 -4 db 1100 +7 1100 -3 db 1101 +8 1101 -2 db 1110 +9 1110 -1 db 1111 +10 1111 -0 db
STA381BW register description: new map doc id 018835 rev 7 77/171 dynamic range compression mode 6.23.5 limiter 1 extended at tack threshold (addr 0x43) the extended attack threshold value is determined as follows: attack threshold = -12 + eath1 / 4 to enable this feature, the eathen1 bit must be set to 1. 6.23.6 limiter 1 extended re lease threshold (addr 0x44) the extended release threshold value is determined as follows: release threshold = -12 + erth1 / 4 to enable this feature, the erthen1 bit must be set to 1. table 71. limiter attack threshold as a function of lxat bits (drc mode) table 72. limiter release threshold as a function of lxrt bits (drc mode) lxat[3:0] drc (db relative to volume) lxrt[3:0] drc (db relative to volume + lxat) 0000 -31 0000 - 0001 -29 0001 -38 db 0010 -27 0010 -36 db 0011 -25 0011 -33 db 0100 -23 0100 -31 db 0101 -21 0101 -30 db 0110 -19 0110 -28 db 0111 -17 0111 -26 db 1000 -16 1000 -24 db 1001 -15 1001 -22 db 1010 -14 1010 -20 db 1011 -13 1011 -18 db 1100 -12 1100 -15 db 1101 -10 1101 -12 db 1110 -7 1110 -9 db 1111 -4 1111 -6 db d7 d6 d5 d4 d3 d2 d1 d0 eathen1 eath1[6] eath1[5] eath1[4] eath1[3] eath1[2] eath1[1] eath1[0] 00110000 d7 d6 d5 d4 d3 d2 d1 d0 erthen1 erth1[6] erth1[5] erth1[4] erth1[3] erth1[2] erth1[1] erth1[0] 00110000
register description: new map STA381BW 78/171 doc id 018835 rev 7 6.23.7 limiter 2 extended at tack threshold (addr 0x45) the extended attack threshold value is determined as follows: attack threshold = -12 + eath2 / 4 to enable this feature, the eathen2 bit must be set to 1. 6.23.8 limiter 2 extended re lease threshold (addr 0x46) the extended release threshold value is determined as follows: release threshold = -12 + erth2 / 4 to enable this feature, the erthen2 bit must be set to 1. note: attack/release threshold step is 0.125 db in the range -12 db to 0 db. 6.24 user-defined coefficient co ntrol registers (addr 0x27 - 0x37) 6.24.1 coefficient address register 6.24.2 coefficient b1 data register bits 23:16 6.24.3 coefficient b1 dat a register bits 15:8 6.24.4 coefficient b1 dat a register bits 7:0 d7 d6 d5 d4 d3 d2 d1 d0 eathen2 eath2[6] eath2[5] eath2[4] eath2[3] eath2[2] eath2[1] eath2[0] 00110000 d7 d6 d5 d4 d3 d2 d1 d0 erthen2 erth2[6] erth2[5] erth2[4] erth2[3] erth2[2] erth2[1] erth2[0] 00110000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved cfa5 cfa4 cfa3 cfa2 cfa1 cfa0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b23 c1b22 c1b21 c1b20 c1b19 c1b18 c1b17 c1b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b15 c1b14 c1b13 c1b12 c1b11 c1b10 c1b9 c1b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b7 c1b6 c1b5 c1b4 c1b3 c1b2 c1b1 c1b0 00000000
STA381BW register description: new map doc id 018835 rev 7 79/171 6.24.5 coefficient b2 data register bits 23:16 6.24.6 coefficient b2 dat a register bits 15:8 6.24.7 coefficient b2 dat a register bits 7:0 6.24.8 coefficient a1 data register bits 23:16 6.24.9 coefficient a1 dat a register bits 15:8 6.24.10 coefficient a1 dat a register bits 7:0 6.24.11 coefficient a2 dat a register bits 23:16 d7 d6 d5 d4 d3 d2 d1 d0 c2b23 c2b22 c2b21 c2b20 c2b19 c2b18 c2b17 c2b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c2b15 c2b14 c2b13 c2b12 c2b11 c2b10 c2b9 c2b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c2b7 c2b6 c2b5 c2b4 c2b3 c2b2 c2b1 c2b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b23 c1b22 c1b21 c1b20 c1b19 c1b18 c1b17 c1b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c3b15 c3b14 c3b13 c3b12 c3b11 c3b10 c3b9 c3b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c3b7 c3b6 c3b5 c3b4 c3b3 c3b2 c3b1 c3b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c4b23 c4b22 c4b21 c4b20 c4b19 c4b18 c4b17 c4b16 00000000
register description: new map STA381BW 80/171 doc id 018835 rev 7 6.24.12 coefficient a2 dat a register bits 15:8 6.24.13 coefficient a2 dat a register bits 7:0 6.24.14 coefficient b0 dat a register bits 23:16 6.24.15 coefficient b0 dat a register bits 15:8 6.24.16 coefficient b0 dat a register bits 7:0 6.24.17 coefficient write /read control register coefficients for user-defined eq, mixing, scaling, and bass management are handled internally in the STA381BW via ram. access to this ram is available to the user via an i 2 c register interface. a collection of i 2 c registers is dedicated to this function. one contains a coefficient base address, five sets of three store the values of the 24-bit coefficients to be written or that were read, and one contains bits used to control the write/read of the coefficient(s) to/from ram. note: the read and write operation on ram coefficients works only if the lrcki pin is switching. d7 d6 d5 d4 d3 d2 d1 d0 c4b15 c4b14 c4b13 c4b12 c4b11 c4b10 c4b9 c4b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c4b7 c4b6 c4b5 c4b4 c4b3 c4b2 c4b1 c4b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c5b23 c5b22 c5b21 c5b20 c5b19 c5b18 c5b17 c5b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c5b15 c5b14 c5b13 c5b12 c5b11 c5b10 c5b9 c5b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c5b7 c5b6 c5b5 c5b4 c5b3 c5b2 c5b1 c5b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved ra r1 wa w1 0 0000
STA381BW register description: new map doc id 018835 rev 7 81/171 reading a coefficient from ram 1. write 6 bits of the address to i 2 c register 0x27. 2. write 1 to the r1 bit in i 2 c address 0x37. 3. read the top 8 bits of the coefficient in i 2 c address 0x28. 4. read the middle 8 bits of the coefficient in i 2 c address 0x29. 5. read the bottom 8 bits of the coefficient in i 2 c address 0x2a. reading a set of coefficients from ram 1. write 6 bits of the address to i 2 c register 0x27. 2. write 1 to the ra bit in i 2 c address 0x37. 3. read the top 8 bits of the coefficient in i 2 c address 0x28. 4. read the middle 8 bits of the coefficient in i 2 c address 0x29. 5. read the bottom 8 bits of the coefficient in i 2 c address 0x2a. 6. read the top 8 bits of coefficient b2 in i 2 c address 0x2b. 7. read the middle 8 bits of coefficient b2 in i 2 c address 0x2c. 8. read the bottom 8 bits of coefficient b2 in i 2 c address 0x2d. 9. read the top 8 bits of coefficient a1 in i 2 c address 0x2e. 10. read the middle 8 bits of coefficient a1 in i 2 c address 0x2f. 11. read the bottom 8 bits of coefficient a1 in i 2 c address 0x30. 12. read the top 8 bits of coefficient a2 in i 2 c address 0x31. 13. read the middle 8 bits of coefficient a2 in i 2 c address 0x32. 14. read the bottom 8 bits of coefficient a2 in i 2 c address 0x33. 15. read the top 8 bits of coefficient b0 in i 2 c address 0x34. 16. read the middle 8 bits of coefficient b0 in i 2 c address 0x35. 17. read the bottom 8 bits of coefficient b0 in i 2 c address 0x36. writing a single coefficient to ram 1. write 6 bits of the address to i 2 c register 0x27. 2. write the top 8 bits of the coefficient in i 2 c address 0x28. 3. write the middle 8 bits of the coefficient in i 2 c address 0x29. 4. write the bottom 8 bits of the coefficient in i 2 c address 0x2a. 5. write 1 to the w1 bit in i 2 c address 0x37.
register description: new map STA381BW 82/171 doc id 018835 rev 7 writing a set of coefficients to ram 1. write 6 bits of the starting address to i 2 c register 0x27. 2. write the top 8 bits of coefficient b1 in i 2 c address 0x28. 3. write the middle 8 bits of coefficient b1 in i 2 c address 0x29. 4. write the bottom 8 bits of coefficient b1 in i 2 c address 0x2a. 5. write the top 8 bits of coefficient b2 in i 2 c address 0x2b. 6. write the middle 8 bits of coefficient b2 in i 2 c address 0x2c. 7. write the bottom 8 bits of coefficient b2 in i 2 c address 0x2d. 8. write the top 8 bits of coefficient a1 in i 2 c address 0x2e. 9. write the middle 8 bits of coefficient a1 in i 2 c address 0x2f. 10. write the bottom 8 bits of coefficient a1 in i 2 c address 0x30. 11. write the top 8 bits of coefficient a2 in i 2 c address 0x31. 12. write the middle 8 bits of coefficient a2 in i 2 c address 0x32. 13. write the bottom 8 bits of coefficient a2 in i 2 c address 0x33. 14. write the top 8 bits of coefficient b0 in i 2 c address 0x34. 15. write the middle 8 bits of coefficient b0 in i 2 c address 0x35. 16. write the bottom 8 bits of coefficient b0 in i 2 c address 0x36. 17. write 1 to the wa bit in i 2 c address 0x37. the mechanism for writing a set of coefficients to ram provides a method of updating the five coefficients corresponding to a given biquad (filter) simultaneously to avoid possible unpleasant acoustic side effects. when using this technique, the 6-bit address specifies the address of the biquad b1 coefficient (for example, 0, 5, 10, 20, 35 decimal), and the STA381BW generates the ram addresses as offsets from this base value to write the complete set of coefficient data.
STA381BW register description: new map doc id 018835 rev 7 83/171 6.24.18 user-defined eq the STA381BW can be programmed for four eq filters (biquads) per each of the two input channels. the biquads use the following equation: y[n] = 2 * (b 0 / 2) * x[n] + 2 * (b 1 / 2) * x[n-1] + b 2 * x[n-2] - 2 * (a 1 / 2) * y[n-1] - a 2 * y[n-2] = b 0 * x[n] + b 1 * x[n-1] + b 2 * x[n-2] - a 1 * y[n-1] - a 2 * y[n-2] where y[n] represents the output and x[n] represents the input. multipliers are 24-bit signed fractional multipliers, with coefficient values in the range of 0x800000 (-1) to 0x7fffff (0.9999998808). coefficients stored in the user-defined co efficient ram are referenced in the following manner: cxhy0 = b 1 / 2 cxhy1 = b 2 cxhy2 = -a 1 / 2 cxhy3 = -a 2 cxhy4 = b 0 / 2 where x represents the channel and the y the biquad number. for example, c2h41 is the b 2 coefficient in the fourth biquad for channel 2. additionally, the STA381BW can be programmed for a high-pass filter (processing channels 1 and 2) and a low-pass filter (processing channel 3) to be used for bass- management crossover when the xo setting is 000 (user-defined). both of these filters when defined by the user (rather than using the preset crossover filters) are second order filters that use the biquad equation given above. they are loaded into the c12h0-4 and c3hy0-4 areas of ram noted in ta b l e 7 3 . channel 1 and channel 2 biquads use by default the extended coefficient range (-4, +4); xover filters use only the standard coefficients range (-1, +1). by default, all user-defined filters are pass-through where all coefficients are set to 0, except the channel 1 and 2 b 0 /2 coefficient which is set to 0x100000 (representing 0.5) and xover b 0 /2 coefficient which is set to 0x400000 (representing 0.5). 6.24.19 pre-scale the STA381BW provides a multiplication for each input channel for the purpose of scaling the input prior to eq. this pre-eq scaling is accomplished by using a 24-bit signed fractional multiplier, with 0x800000 = -1 and 0x7fffff = 0.9999998808. the scale factor for this multiplication is loade d into ram using the same i 2 c registers as the biquad coefficients and the bass management. all chann els can use the channel-1 pre-scale factor by setting the biquad link bit. by default, all pre-scale factors are set to 0x7fffff. 6.24.20 post-scale the STA381BW provides one additional multiplication after the last interpolation stage and the distortion compensation on each channel. this post-scaling is accomplished by using a 24-bit signed fractional multiplier, with 0x800000 = -1 and 0x7fffff = 0.9999998808. the scale factor for this multiplication is loaded into ram using the same i 2 c registers as the biquad coefficients and the bass management. this post-scale factor can be used in conjunction with an adc-equipped microcontroller to perform power-supply error correction. all channels can use the channel-1 post-scale factor by setting the post-scale link bit. by
register description: new map STA381BW 84/171 doc id 018835 rev 7 default, all post-scale factors are set to 0x7fffff. when line output is being used, channel-3 post-scale will affe ct both channels 3 and 4. table 73. ram block for biquads, mixing, scaling and bass management index (decimal) index (hex) d escription coefficient default 0 0x00 channel 1 - biquad 1 c1h10(b1/2) 0x000000 1 0x01 c1h11(b2) 0x000000 2 0x02 c1h12(a1/2) 0x000000 3 0x03 c1h13(a2) 0x000000 4 0x04 c1h14(b0/2) 0x100000 5 0x05 channel 1 - biquad 2 c1h20 0x000000 ?? ? ? ? 19 0x13 channel 1 - biquad 4 c1h44 0x100000 20 0x14 channel 2 - biquad 1 c2h10 0x000000 21 0x15 c2h11 0x000000 ?? ? ? ? 39 0x27 channel 2 - biquad 4 c2h44 0x100000 40 0x28 channel 1/2 - biquad 5 for xo = 000 high-pass 2 nd order filter for xo 000 c12h0(b1/2) 0x000000 41 0x29 c12h1(b2) 0x000000 42 0x2a c12h2(a1/2) 0x000000 43 0x2b c12h3(a2) 0x000000 44 0x2c c12h4(b0/2) 0x400000 45 0x2d channel 3 - biquad for xo = 000 low-pass 2 nd order filter for xo 000 c3h0(b1/2) 0x000000 46 0x2e c3h1(b2) 0x000000 47 0x2f c3h2(a1/2) 0x000000 48 0x30 c3h3(a2) 0x000000 49 0x31 c3h4(b0/2) 0x400000 50 0x32 channel 1 - pre-scale c1pres 0x7fffff 51 0x33 channel 2 - pre-scale c2pres 0x7fffff 52 0x34 channel 1 - post-scale c1psts 0x7fffff 53 0x35 channel 2 - post-scale c2psts 0x7fffff 54 0x36 channel 3 - post-scale c3psts 0x7fffff 55 0x37 reserved reserved 0x5a9df7 56 0x38 channel 1 - mix 1 c1mx1 0x7fffff 57 0x39 channel 1 - mix 2 c1mx2 0x000000 58 0x3a channel 2 - mix 1 c2mx1 0x000000 59 0x3b channel 2 - mix 2 c2mx2 0x7fffff 60 0x3c channel 3 - mix 1 c3mx1 0x400000 61 0x3d channel 3 - mix 2 c3mx2 0x400000 62 0x3e unused 63 0x3f unused
STA381BW register description: new map doc id 018835 rev 7 85/171 6.25 fault-detect recovery constant registers (addr 0x3c - 0x3d) the fdrc bits specify the 16-bit fault-detect re covery time delay. when fault is asserted, the tristate output is immediately asserted low and held low for the time period specified by this constant. a constant value of 0x0001 in this register is approximately 0.083 ms. the default value of 0x300c gives approximately 1 sec. 0x0000 is a reserved value. 6.26 extended configurat ion register (addr 0x47) the extended configuration register provides access to biquad 5, 6 and 7. 6.26.1 extended post-scale range table 74. extended post-scale range post-scale is an attenuation by default. when ps48db is set to 1, a 48-db offset is applied to the coefficient ram value, so post-scale can act as a gain too. 6.26.2 extended attack rate the attack rate shown in ta bl e 6 7 can be extended to provide up to an 8 db/ms attack rate on both limiters. table 75. extended attack rate, limiter 1 d7 d6 d5 d4 d3 d2 d1 d0 fdrc15 fdrc14 fdrc13 fdrc12 fdrc11 fdrc10 fdrc9 fdrc8 00110000 d7 d6 d5 d4 d3 d2 d1 d0 fdrc7 fdrc6 fdrc5 fdrc4 fdrc3 fdrc2 fdrc1 fdrc0 00001100 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved ps48db xar1 xar2 bq5 bq6 bq7 0 000111 ps48db mode 0 post-scale value is applied as defined in the coefficient ram 1 post-scale value is applied with a +48 db offset with respect to the coefficient ram value xar1 mode 0 limiter1 attack rate is configured using ta b l e 6 7 1 limiter1 attack rate is 8 db/ms
register description: new map STA381BW 86/171 doc id 018835 rev 7 table 76. extended attack rate, limiter 2 6.26.3 extended biquad selector bass and treble controls can be configured as user-defined filters when the equalization coefficients link is activated (bql = 1) and the corresponding bqx bit is set to 1. table 77. extended biquad selector, biquad 5 table 78. extended biquad selector, biquad 6 table 79. extended biquad selector, biquad 7 when filters from the 5th to 7th are configured as user-programmable, the corresponding coefficients are stored respectively in addresses 0x20-0x24 (bq5), 0x25-0x29 (bq6), 0x2a- 0x2e (bq7) as given in ta b l e 7 3 . note: the bqx bits are ignored if bql = 0 or if demp = 1 (relevant for bq5) or cxtcb = 1 (relevant for bq6 and bq7). xar2 mode 0 limiter2 attack rate is configured using ta b l e 6 7 1 limiter2 attack rate is 8 db/ms bq5 mode 0 reserved 1 user-defined biquad 5 coefficients are selected bq6 mode 0 pre-set bass filter selected as per ta bl e 6 6 1 user-defined biquad 6 coefficients are selected bq7 mode 0 pre-set treble filter selected as per ta bl e 6 6 1 user-defined biquad 7 coefficients are selected
STA381BW register description: new map doc id 018835 rev 7 87/171 6.27 pll configuration registers (a ddress 0x52; 0x53; 0x54; 0x55; 0x56; 0x57) by default, the STA381BW is able to configure the embedded pll automatically depending on the mcs bits (reg 0x00). for certain applic ations and to provide fl exibility to the user, a manual pll configuration can be used (setting pll_dirp to ?1?) the output pll frequency formula is: where fin is the input clock frequency from the pad. d7 d6 d5 d4 d3 d2 d1 d0 pll_frac[15:8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 pll_frac[7:0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 pll_dith[1:0] pll_ndiv[5:0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 pll_dpd pll_fct pll_stb pll_stbbyp pll_idiv[3:0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved pll_dirp pll_pwd pll_byp osc_pd reserved boost32k 00000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved bypstate pdstate oscok lowck na na na na na na na na table 80. pll factors pll parameter min max frac 0 65535 idiv 0 3 ndiv 5 55 fin ndiv () idiv 1 + () ------------ -------------- - frac 65536 ---------------- - ?? ?? + ?? ??
register description: new map STA381BW 88/171 doc id 018835 rev 7 table 81. pll register 0x54 bits bit r/w rst name description 7r/w 0 pll_dith[1:0] ?00?: pll clock dithering disabled ?01?: pll clock dithering enabled (triangular) ?10?: pll clock dithering enabled (rectangular) ?11?: reserved 6r/w 0 5r/w 0 pll_ndiv pll loop divider 4r/w 0 3r/w 0 2r/w 0 1r/w 0 0r/w 0 table 82. pll register 0x55 bits bit r/w rst name description 7 r/w 0 pll_dpd ?0?: any pll dividers change is implemented via pll power-down ?1?: pll divider change will happen without pll power- down 6 r/w 0 pll_fct ?0?: pll use integer ratio ?1?: pll use fractional ratio 5 r/w 0 pll_stb pll synchronous divider changes strobe 4 r/w 0 pll_stbbyp ?0?: pll_stb is active ?1?: pll_stb control is bypassed 3r/w 0 pll_idiv[3:0] input pll divider 2r/w 0 1r/w 0 0r/w 0 table 83. pll register 0x56 bits bit r/w rst name description 5 r/w 0 pll_dirp ?0?: pll configuration is determined by the mcs bits ?1?: pll configuration is determined by frac, idiv and ndiv 4 r/w 0 pll_pwd ?0?: pll normal behavior ?1?: pll is in power-down mode 3r/w 0pll_byp ?0?: sys clock is from pll ?1?: sys clock is from external pin (pll is bypassed) 2r/w 0 osc_pd ?0?: normal behavior ?1?: internal oscillator is in power-down 0 r/w 0 boost32k ?0?: input oversampling selected by the ir bits ?1?: input oversampling is selected x3
STA381BW register description: new map doc id 018835 rev 7 89/171 6.28 short-circuit protection mode registers shok (address 0x58) the following power bridge pins short-circuit protections are implemented in the STA381BW: outxx vs. gndx outxx vs. vccx out1b vs. out2a the protection is enable d when reg. 0x50 bit 0 (shen) is set to ?1?. the protection will check the short-circuit when the eapd bit is toggled from ?0? to ?1? (i.e . the power bridge is switched on), and only if the test passes (no short), does the power bridge leave the tristate condition. register 0x58 (rea d-only registers) will give more inform ation about the detected short type. gndsh equal to ?0? means that outxx is shorted to ground, while the same value on vccsh means that outxx is shorted to vcc, finally outsh=?0? means that out1b is shorted to out2a. to be noted that once the check is performed, and the tristate released, the short protection is not active anymore until the next eapd 0- >1 toggling which means that shorts that happened during normal operation cannot be detected. to be noted that register shok is meaningful only after the eapd bit is set to ?1? at least once. the short-circuit protections implemented are effective only in btl configuration, and they must not be activated if a single-ended application scheme is needed. table 84. pll register 0x57 bits bit r/w rst name description 3 r/w bypstate pll bypass state 2 r/w pdstate pll pd state 1 r/w oscok osci locked 0 r/w lowck clock input low-frequency check d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved gndsh vccsh outsh na na na na na na na na
register description: new map STA381BW 90/171 doc id 018835 rev 7 figure 26. short-circuit detection timing diagram (no short detected) in figure 26 the short protection timing diagram is shown. the time information is expressed in clock cycles, where the clock frequency is defined as in section section 6.13.1: master clock select . the gray color is used for the short stat us bits to indicate that the bits are carrying the status of the previous eapd 0->1 to ggling (to be noted that after reset this state is meaningless since no eapd tr ansition occurs). the gnd-rela ted shok bits are updated as soon as the gnd test is completed, the vc c bits are updated after vcc test is completed, and the sout bit is updated after the shorted output test is completed. the gnd test, vcc test and output test, are always run (if the sh en bit is active and eapd toggled to ?1?), and only if both tests are successful (no short) do the bridge outputs leave the tristate (indicated by dotted lines in the figure). if one of the three tests (or all) fail, the power bridge outputs are kept in the tristate un til the procedure is restar ted with a new eapd toggling. in this figure eapd is intended to be bit 7 of register 0x05. 6.29 extended coefficient range up to -4...4 (address 0x5a) biquads from 1 to 7 have in the STA381BW th e possibility to extend the coefficient range from [-1,1) to [-4..4) which allows the use of high-shelf filters that may require a coefficient dynamic greater in absolute value than 1. three ranges are available, [-1;1) [-2;2) [-4;4). by default, the extended range is activated. each biquad has its independent setting according to the following table. eapd out1a out1b out2a out2b gnd s h] vcc s h out s h] t s e t t r o h s f o d n e t s e t c c v t r a t s t s e t d n g t r a t s 44 cycle s 50005 cycle s 50005 cycle s 1cycle s t a rt o u t te s t tbd cycle s d7 d6 d5 d4 d3 d2 d1 d0 cext_b4[1] cext_b4[0] cext_b3[1] cext_b3[0] cext_b2[1] cext_b2[0] cext_b1[1] cext_b1[0] 10101010 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved cext_b7[1] cext_b7[0] cext_b6[1] cext_b6[0] cext_b51] cext_b5[0] 00101010
STA381BW register description: new map doc id 018835 rev 7 91/171 table 85. coefficients extended range configuration in this case the user can decide, for each filter stage, the right coefficient range. note that for a given biquad the same range will be applied to the left and right (channel 1 and channel 2). the crossover biquad does not have the availab ility of this feature, maintaining the [-1;1) range unchanged. 6.30 miscellaneous register s (address 0x5c, 0x5d) 6.30.1 rate power-down enable (rpdnen) bit in the STA381BW, by default, the power-down pin and i 2 c power-down act on mute commands to perform the fade-out. this default can be changed so that the fade-out can be started using the master volume. the rpdnen bit, when set, activates this feature. 6.30.2 bridge immediately off (bri dgoff) bit (addre ss 0x4b, bit d5) a fade-out procedure is started in the STA381BW once the pwdn function is enabled, and after 13 million clock cycles (pll internal frequ ency) the bridge is put in power-down (tristate mode). there is also the possibility to change this behavior so that the power bridge will be switched off immediately after the pwdn pin is tied to ground, without waiting for the 13 million clock cycles. the bridgoff bit, when set, activates this function. obviously the immediate power-down will genera te a pop noise at the output , therefore th is procedure must be used only in cases where pop noise is no t relevant in the application. note that this feature works only for hardware pwdn assertion and not for a power-down applied through the iic interface. refer to section 6.30.5 if programming a different number of clock cycles is needed. cext_bx[1] cext_bx[0] range 00 [-1;1) 01 [-2;2) 10 [-4;4) 1 1 reserved d7 d6 d5 d4 d3 d2 d1 d0 rpdnen reserved bridgoff reserved reserved cpwmen reserved reserved 01100100 d7 d6 d5 d4 d3 d2 d1 d0 lpdp lpd lpde pndlsl[2] pndlsl[1] pndlsl[0] reserved shen 01001100
register description: new map STA381BW 92/171 doc id 018835 rev 7 6.30.3 channel pwm enab le (cpwmen) bit this bit, when set, activates a mute output in case the volume reaches a value lower than -76 dbfs. 6.30.4 external amplifier hardware pin enabler (lpdp, lpd lpde) bits pin 42 (intline), normally indicating a fault condition, using the following 3 register settings can be reconfigured as a hardware pin enabler for an external headphone or line amplifier. in particular the lpde bit, when set, activates this function. accordingly, the lpd value (0 or 1) is exported on pin 42 and in case of power-down assertion, pin 42 is tied to lpdp. the lpdp bit, when set, negates the value programmed as the lpd value, refer to the following table. table 86. external amplifier enabler configuration bits figure 27. alternate function for intline pin 6.30.5 power-down delay selector (pndlsl[2:0]) bits the assertion of pwdn activates a counter that, by default, after 13 million clock cycles puts the power bridge in tristate mode, independently from the fade-out time. using these registers it is possible to program this counter according to the following table. lpdp lpd lpde pin 42 output x x0 int_line 0 01 0 0 11 1 1 01 1 1 11 0 y n ?0? lpd ?is the device in powerdown?? 0 1 lpdp 0 1 lpde power bridge fault in tline
STA381BW register description: new map doc id 018835 rev 7 93/171 table 87. pndlsl bits configuration 6.30.6 short-circuit check enable bit this bit, when enable d, will activate the short-circuit checks before any power bridge activation (eapd bit 0->1). see section section 6.28: short-circuit protection mode registers shok (address 0x58) for more details. 6.31 bad pwm detection regist ers (address 0x5 e, 0x5f, 0x60) the STA381BW implements a detection on pwm outputs able to verify if the output signal has no zero-crossing in a configurable time window. this check can be useful to detect the dc level in the pwm outputs. to be noted that the checks are performed on logic level pwm (i.e. not the power bridge ones, nor the pwm on ddx3 and ddx4 ios). in case of ternary modulation, the detection threshold is computed as: th=[(bpth*2+1)/128]*100% if the measured pwm duty cycle is detected greater than or equal to th for more than bptim pwm periods, the corresponding pwm bit will be set in register 0x01. in case of binary modulation, there are two thresholds: th1=[(64+bpth)/128]*100% th2=[(64-bpth)/128]*100% in this case if the measured pwm duty cycle is outside the th1-th 2 range for more than bptim pwm periods, the corresponding bit will be set in register 0x4e. pndlsl[2] pndlsl[1] pndlsl[2] fade-out time 00 0 default time (13m pll clock cycles) 00 1 default time divided by 2 01 0 default time divided by 4 01 1 default time divided by 8 10 0 default time divided by 16 10 1 default time divided by 32 11 0 default time divided by 64 11 1 default time divided by 128 d7 d6 d5 d4 d3 d2 d1 d0 bpth[5] bpth[4] bpth[3] bpth[2] bpth[1] bpth[0] reserved reserved 00110010 d7 d6 d5 d4 d3 d2 d1 d0 bptim[7] bptim[6] bptim[5] bptim[4] bptim[3] bptim[2] bptim[1] bptim[0] 01011110
register description: new map STA381BW 94/171 doc id 018835 rev 7 6.32 enhanced zero-detect mute and input level measurement (address 0x61-0x65, 0x3f, 0x40, 0x6f) the STA381BW implements an rms-based zero-detect function (on serial input interface data) able to detect in a very reliable way the presence of an input signal, so that the power bridge outputs can be automatically connected to ground. when active, the function will mute the output pwm when the input le vel becomes less than ?threshold - hysteresis?. once muted, the pwm will be unmuted when the input level is detected greater than ?threshold + hysteresis?. the measured level is then reported (for each input channel) on registers zcccfg1 - zcccfg2, zcccfg3 - zcccfg4 accord ing to the following equation: value_in_db = 20*log 10 (reg_value/(2 16 *0.635)) d7 d6 d5 d4 d3 d2 d1 d0 wthh wthl fineth hsel[1:0] zmth[2:0] 00000111 d7 d6 d5 d4 d3 d2 d1 d0 rms_ch0[7:0] n/a n/a n/a n/a n/a n/a n/a n/a d7 d6 d5 d4 d3 d2 d1 d0 rms_ch0[15:8] n/a n/a n/a n/a n/a n/a n/a n/a d7 d6 d5 d4 d3 d2 d1 d0 rms_ch1[7:0] n/a n/a n/a n/a n/a n/a n/a n/a d7 d6 d5 d4 d3 d2 d1 d0 rms_ch1[15:8] n/a n/a n/a n/a n/a n/a n/a n/a table 88. zero-detect threshold zmth[2:0] equivalen t input level (db) 000 -78 001 -84 010 -90 011 -96 100 -102 101 -108 110 -114 111 -114
STA381BW register description: new map doc id 018835 rev 7 95/171 the thresholds and hysteresis table above can be overridden and the low-level threshold and high-level threshold can be set by the mth[21:0] bits. to activate the manual thresholds the fineth bit has to be set to ?1?. to configure the low threshold, the wthl bit must be set to ?1? so that any write operation to the mth bits will set the low threshold. to configure the low threshold, the wthh bit must be set to ?1? so that any write operation to the mth bits will set the low threshold. if the zero-mute block does not detect mute, it will mute the output when the current rms value falls below the low threshold. if the zero-mute block does not detect mute, it will unmute the output when the current rms value rises above the high threshold. table 90. manual threshold register 0x3f, 0x40 and 0x6f table 89. zero-detect hysteresis hsel[1:0] equivalent input level hysteresis(db) 00 3 01 4 10 5 11 6 d7 d6 d5 d4 d3 d2 d1 d0 reservedt reserved mth[21:16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 mth[15:8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 mth[7:0] 00000000
register description: new map STA381BW 96/171 doc id 018835 rev 7 6.33 headphone/line out configur ation register (address 0x66) d7 d6 d5 d4 d3 d2 d1 d0 hpln reserved reserved reserved cpfen cpok abfault dcrok 00100nanana table 91. headphone/line out configuration bits bit r/w rst name description 7r/w 0 hpln when f3x is connected to the internal hp/line driver this bit selects the gain of the f3x->analog out path. ?0?: hp out. when the mvol+channel vol is 0 dbfs, a 0 dbfs input will generate a 40 mw output on a 32 ohm load (+/- 3.3v supply). ?1?: line out. when the mvol+channel vol is 0 dbfs, a 0 dbfs input will generate a 2 vrms output (+/- 3.3 v supply) 3 r/w 0 cpfen ?0?: charge pump auto-enable when unmute ?1?: charge pump is always enabled 2rna cpok ?0?: charge pump is not working ?1?: charge pump is working and it is ok 1 r na abfault ?0?: no fault on class-ab ?1?: overcurrent fault detected on class-ab 0 r na dcrok ?1?: core supply ok
STA381BW register description: new map doc id 018835 rev 7 97/171 6.34 f3xcfg (address 0x69; 0x6a) d7 d6 d5 d4 d3 d2 d1 d0 f3xlnk reserved reserved reserved re served reserved reserved reserved 00000000 d7 d6 d5 d4 d3 d2 d1 d0 f3x_fault reserved reserved f3x_sm_slope[2:0] f3x_mute f3x_ena 11101110 table 92. f3x configuration register 1 bit r/w rst name description 7r/w 0 f3xlnk ?0?: f3x normal control mode ?1?: f3x mute/unmute linked to hp/line mute table 93. f3x configuration register 2 bit r/w rst name description 7 r 1 f3x_fault ?0?: normal operation 4r/w 0 f3x_sm_slope ?000?: 0 ms ?001?: 25 ms ?010?: 50 ms ?011?: 100 ms ?100?: 200 ms ?101?: 250 ms ?110?: 500 ms ?111?: 1000 ms 3r/w 1 2r/w 1 1 r/w 1 f3x_mute ?1?: mute 0 r/w 0 f3x_ena ?1?: f3x enable
register description: new map STA381BW 98/171 doc id 018835 rev 7 6.35 stcompressor tm configuration regist er (address 0x6b; 0x6c) table 94. register stccfg0 table 96. register stccfg1 6.36 charge pump synchronization (address 0x70) table 98. charge pump sync configuration bits d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved crc_res reserved reserved 00010000 table 95. stccfg0 register bit r/w rst name description 2 r/w 0 crc_res ?0? = crc comparison successful ?1? = crc comparison error d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved reserved stc_lnk reserved 00000000 table 97. stccfg1 register bit r/w rst name description 1r/w 0 stc_lnk ?0? = normal operations ?1? = stereo link enabled. see section 4.3.8: stereo link d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved chpi initcnt[3:0] chprd 00011001 bit r/w rst name description 5 r/w 0 chpi ?0?: charge pump phase: 0 deg ?1?: charge pump phase: 180 deg 4r/w 1 initcnt[3:0] change charge pump phase at one clock step 3r/w 1 2r/w 0 1r/w 0 0 r/w 1 chprd ?0?: charge pump synchronized with pwm frame ?0?: charge pump not synchronized with pwm frame
STA381BW register description: new map doc id 018835 rev 7 99/171 the charge pump can be synchronized with the pwm frame in order to minimize the crosstalk between the charge pump and the pwm waveform. this functionality cannot be activated when the pwms bit (address 0x15 bit d4) is set to 1. 6.37 coefficient ram crc prot ection (address 0x71-0x7d) d7 d6 d5 d4 d3 d2 d1 d0 bqcke[7] bqcke[6] bqcke[5] bqcke[4] bqcke[3] bqcke[2] bqcke[1] bqcke[0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqcke[15] bqcke[14] bqcke[13] bqcke[12] bqcke[11] bqcke[10] bqcke[9] bqcke[8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqcke[23] bqcke[22] bqcke[21] bqcke[20] bqcke[19] bqcke[18] bqcke[17] bqcke[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xccke[7] xccke[6] xccke[5] xccke[4] xccke[3] xccke[2] xccke[1] xccke[0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xccke[15] xccke[14] xccke[13] xccke[12] x ccke[11] xccke[10] xccke[9] xccke[8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xccke[23] xccke[22] xccke[21] xccke[20] x ccke[19] xccke[18] xccke[17] xccke[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqckr[7] bqckr[6] bqckr[5] bqckr[4] bqckr[3] bqckr[2] bqckr[1] bqckr[0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqckr[15] bqckr[14] bqckr[13] bqckr[12] bqckr[11] bqckr[10] bqckr[9] bqckr[8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqckr[23] bqckr[22] bqckr[21] bqckr[20] bqckr[19] bqckr[18] bqckr[17] bqckr[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcckr[23] xcckr[22] xcckr[21] xcckr[20] x cckr[19] xcckr[18] xcckr[17] xcckr[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcckr[23] xcckr[22] xcckr[21] xcckr[20] x cckr[19] xcckr[18] xcckr[17] xcckr[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcckr[23] xcckr[22] xcckr[21] xcckr[20] x cckr[19] xcckr[18] xcckr[17] xcckr[16]
register description: new map STA381BW 100/171 doc id 018835 rev 7 the STA381BW implements an automatic crc computat ion for the biquad and mdrc/xover coefficient memory ( ta bl e 7 3 ). memory cell contents from address 0x00 to 0x27 will be bit xored to obta in the bqchke checksum, while cells from 0x28 to 0x31 will be xored to obtain the xcchke checksum. both checksums (24-bit wide) are exported on i 2 c registers from 0x60 to 0x65. the checksum computation will start as soon as the bcgo (for biquad ram bank) or the xcgo bit (for mdrc/xover coefficients) is set to 1. the checksum is computed at the processing sample rate if the ir bits equal ?01? or ?10?, otherwise the checksum is computed to half of the processing sample rate. when bccmp or xccmp is set to ?1?, the relative checks um (bqchke and xcchke) is continuously compared with bqchkr and xcchk r respectively. if the checksum matches its own reference value, the respective result bits (bcres and xcres) will be set to ?0?. the compare bits have no effect if the respective go bit is not set. in case of checksum errors (i.e. the internally computed didn?t match the reference), an automatic device reset action can be activated. this function is enabled when the bcauto or xcauto bit is set to ?1?. the automatic reset bits have no effect if the respective compare bits are not set. the recommended procedure for automatic reset activation is the following: download the set of coefficients (ram locations 0x00?0x27) download the externally computed biquad checksum into registers bqchkr enable the checksum of the biquad coefficients by setting the bcgo bit. the checksum will start to be automatically co mputed by the STA381BW and its value exposed on registers bqchecke. the checksum value is computed and updated. enable the checksum comparison by setting the bccmp bit. the internally computed checksum will start to be compared with th e reference one and the result will be exposed on the bcres bit. the following operation will be executed on each audio frame: if (( bqchke == bqchkr )) { bc_res = 0;// checksum is ok, reset the error bit } 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcauto xcres xccmp xcgo bcauto bccres bccmp bccgo 00000000 d7 d6 d5 d4 d3 d2 d1 d0
STA381BW register description: new map doc id 018835 rev 7 101/171 else { bc_res = 1;// checksum error detected, set the error bit } wait until the bcres bit goes to 0, meaning that the checksum result bit has started to be updated and everythi ng is ok. time-out of this operation (e.g. >1 ms) will indicate checksum failure, and the mcu will handle this event enable automatic reset of the device in case of checksum error by setting the bcauto bit. the bcres bit will then be automatically checked by the STA381BW, on each audio frame, and a reset event will be tr iggered in case of checksum mismatch. periodically check the bc_res status. a value of 1 indicates a checksum mismatch has occurred and, therefore, that the device went through a reset cycle. the previous example is intended for biquad crc bank calculation, but it can be easily extended to mdrc/xo ver crc computation. 6.38 misc4 (address 0x7e) the STA381BW allows direct access to the ra m coefficients bypassing the indirect access mechanism described in section 6.24: user-defined coefficient control registers (addr 0x27 - 0x37) . direct access is implemented as follows. d7 d6 d5 d4 d3 d2 d1 d0 smap reserved reserved reserved reserved reserved wra ch12 10000000 table 99. misc register 4 bit r/w rst name description 7r/w 1 smap ?1? = new map ?0? = stmap 1r/w 0 wra ?0? = normal operations ?1? = enables the write-all procedure when using the ram coefficients direct access 0r/w 0 ch12 ?0? = normal operations ?1? = enables the ram coefficients direct access
register description: new map STA381BW 102/171 doc id 018835 rev 7 direct single-write procedure 1. set reg 0x7e bit 0 to 1 and bit 1 to 0 to enable the direct ram access in single-write mode. 2. write the coefficient value to the device using an i 2 c bus single-write operation as discribed in figure 28 . figure 28. coefficients direct access single-write operation direct multi-write procedure 1. set the reg 0x7e bit 0 to 1 and bit 1 to 1 to enable direct ram access in multi-write mode. 2. write the coefficients value to the device using an i 2 c bus multi-write operation as discribed in figure 29 . please note that by using the mult i-write procedure, it is possible to write the entire ram contents at once. figure 29. coefficients direct access multiple-write operation direct single-read procedure 1. set reg 0x7e bit 0 to 1 and bit 1 to 0 to enable the direct ram access in single-read mode. 2. read the coefficient value from the device using an i 2 c bus single-read operation as discribed in figure 30 . figure 30. coefficients direct access single-read operation please be aware that the STA381BW supports 24-bit coefficients, for this reason in the above figures coeff_x(0) is always equal to 0x00 when either reading or writing. the multi- write procedure embeds a wrap-around mechanism: when trying to write into a location exceeding the maximum coeffi cient address, the multi-wr ite procedure will start from location 0x00. slave address s w a mem addr a coeff_0(3) a coeff_0(2) a coeff_0(1) a coeff_0(0) a coeff_1(3) a coeff_1(2) a coeff_1(1) a coeff_1(0) a coeff_n(3) a coeff_n(2) a coeff_n(1) a coeff_n(0) a
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 103/171 7 register description: sound terminal compatibility to keep compatibility with previous sound terminal devices, the 0x7e bit d7 must be set to 0 after device turn-on and after any reset (via sw or via external pin). missing addresses are to be considered as reserved. table 100. i 2 c registers summary addr name d7 d6 d5 d4 d3 d2 d1 d0 00 confa fdrb ir1 ir0 mcs2 mcs1 mcs0 01 confb c2im c1im dscke saifb sai3 sai2 sai1 sai0 02 confc csz3 csz2 csz1 csz0 03 confd sme zde bql psl dspb 04 confe sve zce pwms ame nsbw 05 conff eapd pwdn ldte bcle ide ocfg1 ocfg0 06 mute loc loc1 loc0 bqb_all c3m c2m c1m mmute 07 mvol mvol[7:0] 08 ch1vol ch1vol[7:0] 09 ch2vol ch2vol[7:0] 0a ch3vol ch3vol[7:0] 0c auto xo3 xo2 xo1 xo0 amam2 amam1 amam0 amame 0e c1cfg c1om1 c1om0 c1ls1 c1ls0 c1bo c1vbp c1eqbp c1tcb 0f c2cfg c2om1 c2om0 c2ls1 c2ls0 c2bo c2vbp c2eqbp c2tcb 10 c3cfg c3om1 c3om0 c3ls1 c3ls0 c3bo c3vbp 11 tone ttc3 ttc2 ttc1 ttc0 btc3 btc2 btc1 btc0 12 l1ar l1a3 l1a2 l1a1 l1a0 l1r3 l1r2 l1r1 l1r0 13 l1atrt l1at3 l1at2 l1at1 l1at0 l1rt3 l1rt2 l1rt1 l1rt0 14 l2ar l2a3 l2a2 l2a1 l2a0 l2r3 l2r2 l2r1 l2r0 15 l2atrt l2at3 l2at2 l2at1 l2at0 l2rt3 l2rt2 l2rt1 l2rt0 16 cfaddr cfa5 cfa4 cfa3 cfa2 cfa1 cfa0 17 b1cf1 c1b23 c1b22 c1b21 c1b20 c1b19 c1b18 c1b17 c1b16 18 b1cf2 c1b15 c1b14 c1b13 c1b12 c1b11 c1b10 c1b9 c1b8 19 b1cf3 c1b7 c1b6 c1b5 c1b4 c1b3 c1b2 c1b1 c1b0 1a b2cf1 c2b23 c2b22 c2b21 c2b20 c2b19 c2b18 c2b17 c2b16 1b b2cf2 c2b15 c2b14 c2b13 c2b12 c2b11 c2b10 c2b9 c2b8 1c b2cf3 c2b7 c2b6 c2b5 c2b4 c2b3 c2b2 c2b1 c2b0 1d a1cf1 c3b23 c3b22 c3b21 c3b20 c3b19 c3b18 c3b17 c3b16 1e a1cf2 c3b15 c3b14 c3b13 c3b12 c3b11 c3b10 c3b9 c3b8
register description: sound terminal compatibility STA381BW 104/171 doc id 018835 rev 7 1f a1cf3 c3b7 c3b6 c3b5 c3b4 c3b3 c3b2 c3b1 c3b0 20 a2cf1 c4b23 c4b22 c4b21 c4b20 c4b19 c4b18 c4b17 c4b16 21 a2cf2 c4b15 c4b14 c4b13 c4b12 c4b11 c4b10 c4b9 c4b8 22 a2cf3 c4b7 c4b6 c4b5 c4b4 c4b3 c4b2 c4b1 c4b0 23 b0cf1 c5b23 c5b22 c5b21 c5b20 c5b19 c5b18 c5b17 c5b16 24 b0cf2 c5b15 c5b14 c5b13 c5b12 c5b11 c5b10 c5b9 c5b8 25 b0cf3 c5b7 c5b6 c5b5 c5b4 c5b3 c5b2 c5b1 c5b0 26 cfud ra r1 wa w1 2b fdrc1 fdrc15 fdrc14 fdrc13 fdrc12 fdrc11 fdrc10 fdrc9 fdrc8 2c fdrc2 fdrc7 fdrc6 fdrc5 f drc4 fdrc3 fdrc2 fdrc1 fdrc0 2d status pllul fault 2e mth2 mth[21:16] 2f mth1 mth[15:8] 31 eqcfg xob 32 eath1 eathen1 eath1[6:0] 33 erth1 erthen1 erth1[6:0] 34 eath2 eathen2 eath2[6:0] 35 erth2 erthen2 erth2[6:0] 36 confx mdrce ps48db xar1 xar2 bq5 bq6 bq7 37 svup svup_ en svup_rate[4:0] 38 svdn svdn_ en svdn_rate[4:0] 3f evolres vres_en vrestg _en exvres_ch3[1:0] exvres_ch2[1:0] exvres_ch1[1:0] 40 evolres2 exvres_mvol[1:0] 41 pllfrac1 pll_frac[15:8] 42 pllfrac0 pll_frac[7:0] 43 plldiv pll_dith[ 1:0] pll_ndiv[5:0] 44 pllcfg0 pll_ dpd pll_ fct pll_stb pll_ stbbyp pll_idiv[3:0] 45 pllcfg1 pll_ dirp pll_pwd pll_byp osc_pd boost32k 46 pllstate bypstate pdstate oscok lowck 47 shok gndsh vccsh outsh 49 cxt41 cext_b4[1:0] cext_b3[1: 0] cext_b2[1:0] cext_b1[1:0] 4a cxt75 cext_b7[1:0] cext _b6[1:0] cext_b5[1:0] 4b misc1 rpdnen bridgoff cpwmen table 100. i 2 c registers summary (continued)
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 105/171 4c misc2 lpdp lpd lpde pndlsl[2:0] shen 4d bpth bpth(5:0) 4e badpwm bp4b bp4a bp3b bp3a bp2b bp2a bp1b bp1a 4f bptim bptim[7:0] 50 zccfg0 wthh wthl fineth hsel[1:0] zmth[2:0] 51 zccfg1 rms_ch0[7:0] 52 zccfg2 rms_ch0[15:8] 53 zccfg3 rms_ch1[7:0] 54 zccfg4 rms_ch1[15:8] 55 hpcfg hpln mute cpfen cpok abfault dcrok 58 f3xcfg1 f3xlnk 59 f3xcfg2 f3x_ fault f3x_sm_slope[2:0] f3x_ mute f3x_ena 5a stccfg0 lim_ byp stc_byp stc_ena np_ crcres np_crc_ go 5b stccfg1 stc_lnk brc_en 5e mth0 mth[7:0] 5f chpsinc chpi initcnt[3:0] chprd 60 bqchke0 bq_cke[7:0] 61 bqchke1 bq_cke[15:8] 62 bqchke2 bq_cke[23:16] 63 xcchke0 xc_cke[7:0] 64 xcchke1 xc_cke[15:8] 65 xcchke2 xc_cke[23:16] 66 bqchkr0 bq_ckr[7:0] 67 bqchkr1 bq_ckr[15:8] 68 bqchkr2 bq_ckr[23:16] 69 xcchkr0 xc_ckr[7:0] 6a xcchkr1 xc_ckr[15:8] 6b xcchkr2 xc_ckr[23:16] 6c chkctrl xcauto xcres xccmp xcgo bcauto bcres bccmp bcgo 6e misc3 sreset 7e misc4 smap table 100. i 2 c registers summary (continued)
register description: sound terminal compatibility STA381BW 106/171 doc id 018835 rev 7 7.1 configuration register a (addr 0x00) 7.1.1 master clock select the STA381BW supports sampling rates of 32 khz, 44.1 khz, 48 khz, 88.2 khz, 96 khz, 176.4 khz, and 192 khz. therefore the internal clock is: 32.768 mhz for 32 khz 45.1584 mhz for 44.1 khz, 88.2 khz, and 176.4 khz 49.152 mhz for 48 khz, 96 khz, and 192 khz the external clock frequency provided to the xti pin or bicki pin (depending on mcs settings) must be a multiple of the input sampling frequency (f s ). the relationship between the input clock (either xti or bicki) and the input sampling rate is determined by both the mcsx and the ir (input rate) register bits. the mcsx bits determine the pll factor generating the internal clock and the ir bit determines the oversampling ratio used internally. in ta b l e 1 0 2 mcs 111 and 110 indicate that bicki has to be used as the clock source, while xti is used in all the other cases. note: (*) clock is bicki d7 d6 d5 d4 d3 d2 d1 d0 fdrb reserved reserved ir1 ir0 mcs2 mcs1 mcs0 01100111 table 101. master clock select bit r/w rst name description 0r/w 1 mcs0 selects the ratio between the input i 2 s sampling frequency and the input clock. 1r/w 1 mcs1 2r/w 1 mcs2 table 102. input sampling rates input sampling rate fs (khz) ir mcs[2:0] 111 110 101 100 011 010 001 000 32, 44.1, 48 00 64*fs(*) na 576 * fs 128 * fs 256 * fs 384 * fs 512 * fs 768 * fs 88.2, 96 01 64*fs(*) 32*fs(*) na 64 * fs 128 * fs 192 * fs 256 * fs 384 * fs 176.4, 192 1x 64*fs(*) 32*fs(*) na 32 * fs 64 * fs 96 * fs 128 * fs 192 * fs
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 107/171 7.1.2 interpolation ratio select the STA381BW has variable interpolation (oversampling) settings such that internal processing and ffx output rates remain consis tent. the first processing block interpolates by either 3 times (see section 4.2 ), 2 times or 1 time (pass-through) or provides a 2 times downsample. the oversampling ratio of this interpolation is determined by the ir bits. 7.1.3 fault-detect recovery bypass the on-chip STA381BW power output block provides feedback to the digital controller using inputs to the power control block. the fault input is used to indicate a fault condition (either overcurrent or thermal). when fault is asserted (set to 0), the power control block attempts a recovery from the fault by asserting the tri-state output (setting it to 0 which directs the power output block to begin recovery), holds it at 0 for period of time in the range of 0.1 ms to 1 second as defined by the fault-detect recovery constant register (fdrc registers 0x2b- 0x2c), then toggles it back to 1. this sequence is repeated as long as the fault indication exists. this feature is enabled by default, but can be bypassed by setting the fdrb control bit to 1. table 103. internal interpolation ratio bit r/w rst name description 4:3 r/w 00 ir [1:0] selects internal interpolation ratio based on input i 2 s sampling frequency table 104. ir bit settings as a function of the input sampling rate input sampling rate fs (khz) ir 1st stage interpolation ratio 32 00 2-times oversampling 44.1 00 2-times oversampling 48 00 2-times oversampling 88.2 01 pass-through 96 01 pass-through 176.4 10 2-times downsampling 192 10 2-times downsampling table 105. fault-detect recovery bypass bit r/w rst name description 7r/w 0 fdrb 0: fault-detect recovery enabled 1: fault-detect recovery disabled
register description: sound terminal compatibility STA381BW 108/171 doc id 018835 rev 7 7.2 configuration register b (addr 0x01) 7.2.1 serial data interface the STA381BW audio serial input was designed to interface with standard digital audio components and to accept a number of serial data formats. the STA381BW always acts as the slave when receiving audio input from standard digital audio components. serial data for two channels is provided using three inputs: left/right clock lrcki, serial clock bicki, and serial data 1 and 2 sdi12. the sai bits (d3 to d0) and the saifb bit (d4) are used to specify the serial data format. the default serial data format is i 2 s, msb-first. available formats are shown in the tables that follow. 7.2.2 serial audio i nput interface format 7.2.3 serial data first bit d7 d6 d5 d4 d3 d2 d1 d0 c2im c1im dscke saifb sai3 sai2 sai1 sai0 10000000 table 106. serial audio input interface bit r/w rst name description 0 r/w 0 sai0 determines the interface format of the input serial digital audio interface 1 r/w 0 sai1 2 r/w 0 sai2 3 r/w 0 sai3 table 107. serial data first bit saifb format 0 msb-first 1 lsb-first
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 109/171 table 108. support serial audio input formats for msb-first (saifb = 0) bicki sai [3:0] saifb interface format 32 * fs 0000 0 i 2 s 15-bit data 0001 0 left/right-justified 16-bit data 48 * fs 0000 0 i 2 s 16- to 23-bit data 0001 0 left-justified 16- to 24-bit data 0010 0 right-justified 24-bit data 0110 0 right-justified 20-bit data 1010 0 right-justified 18-bit data 1110 0 right-justified 16-bit data 64 * fs 0000 0 i 2 s 16- to 24-bit data 0001 0 left-justified 16- to 24-bit data 0010 0 right-justified 24-bit data 0110 0 right-justified 20-bit data 1010 0 right-justified 18-bit data 1110 0 right-justified 16-bit data
register description: sound terminal compatibility STA381BW 110/171 doc id 018835 rev 7 to make the STA381BW work properly, the serial audio interface lrcki clock must be synchronous to the pll output clock which means that: the frequency of pll clock / frequency of lrcki = n 4 cycles, where n depends on the settings in table 30 on page 58 the pll must be locked. if these two conditions are not met, and the ide bit (reg 0x05 bit 2) is set to 1, the STA381BW will immediately mute the i 2 s pcm data out (provided to the processing block) and it will freeze any active processing task. to avoid any audio side effects (like pop noise), it is strongly recommended to soft-mute any audio streams flowing into the STA381BW data path before the desynchronization event table 109. supported serial audio input formats for lsb-first (saifb = 1) bicki sai [3:0] saifb interface format 32 * fs 1100 1 i 2 s 15-bit data 1110 1 left/right-justified 16-bit data 48 * fs 0100 1 i 2 s 23-bit data 0100 1 i 2 s 20-bit data 1000 1 i 2 s 18-bit data 1100 1 lsb first i 2 s 16-bit data 0001 1 left-justified 24-bit data 0101 1 left-justified 20-bit data 1001 1 left-justified 18-bit data 1101 1 left-justified 16-bit data 0010 1 right-justified 24-bit data 0110 1 right-justified 20-bit data 1010 1 right-justified 18-bit data 1110 1 right-justified 16-bit data 64 * fs 0000 1 i 2 s 24-bit data 0100 1 i 2 s 20-bit data 1000 1 i 2 s 18-bit data 1100 1 lsb first i 2 s 16-bit data 0001 1 left-justified 24-bit data 0101 1 left-justified 20-bit data 1001 1 left-justified 18-bit data 1101 1 left-justified 16-bit data 0010 1 right-justified 24-bit data 0110 1 right-justified 20-bit data 1010 1 right-justified 18-bit data 1110 1 right-justified 16-bit data
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 111/171 happens. at the same time any processing related to the i 2 c configuration should be issued only after the serial audio interface and the internal pll are synchronous again. note: any mute or volume change causes some delay in the completion of the i 2 c operation due to the soft volume feature. the soft volume phase change must be finished before any clock desynchronization. 7.2.4 delay serial clock enable 7.2.5 channel input mapping each channel received via i 2 s can be mapped to any internal processing channel via the channel input mapping regi sters. this allows for flexibility in processing. the default settings of these registers map each i 2 s input channel to its corresponding processing channel. table 110. delay serial clock enable bit r/w rst name description 5r/w 0 dscke 0: no serial clock delay 1: serial clock delay by 1 core clock cycle to tolerate anomalies in some i 2 s master devices table 111. channel input mapping bit r/w rst name description 6r/w 0 c1im 0: processing channel 1 receives left i 2 s input 1: processing channel 1 receives right i 2 s input 7r/w 1 c2im 0: processing channel 2 receives left i 2 s input 1: processing channel 2 receives right i 2 s input
register description: sound terminal compatibility STA381BW 112/171 doc id 018835 rev 7 7.3 configuration register c (addr 0x02) 7.3.1 ffx compensating pul se size register table 6: 7.4 configuration register d (addr 0x03) 7.4.1 dsp bypass setting the dspb bit bypasses th e eq function of the STA381BW. d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved csz3 csz2 csz1 csz0 reserved reserved 10010111 table 112. ffx compensating pulse size bits bit r/w rst name description 2r/w 1 csz0 when om[1,0] = 11, this register determines the size of the ffx compensating pulse from 0 clock ticks to 15 clock periods. 3r/w 1 csz1 4r/w 1 csz2 5r/w 0 csz3 table 113. compensating pulse size csz[3:0] compensating pulse size 0000 0 ns (0 ticks) compensating pulse size 0001 20 ns (1 tick) clock period compensating pulse size ?? 1111 300 ns (15 ticks) clock period compensating pulse size d7 d6 d5 d4 d3 d2 d1 d0 sme zde reserved bql psl dspb reserved reserved 00011000 table 114. dsp bypass bit r/w rst name description 2 r/w 0 dspb 0: normal operation 1: bypass of biquad and bass/treble functions
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 113/171 7.4.2 post-scale link post-scale functionality can be used for power supply error correction. for multi-channel applications running off the same power supply, the post-scale values can be linked to the value of channel 1 for ease of use and in order to update the values faster. 7.4.3 biquad coefficient link for ease of use, all channels can use the biquad coefficients loaded into the channel-1 coefficient ram space by setting the bql bit to 1. therefore, any eq updates only have to be performed once. 7.4.4 zero-detect mute enable refer to 7.24: enhanced zero-detect mute and input level measurement (address 0x50- 0x54, 0x2e, 0x2f and 0x5e) . 7.4.5 submix mode enable 7.5 configuration register e (addr 0x04) table 115. post-scale link bit r/w rst name description 3 r/w 1 psl 0: each channel uses individual post-scale value 1: each channel uses channel 1 post-scale value table 116. biquad coefficient link bit r/w rst name description 4r/w 1 bql 0: each channel uses coefficient values 1: each channel uses channel 1 coefficient values table 117. zero-detect mute enable bit r/w rst name description 6r/w 0 zde setting of 1 enables the automatic zero-detect mute setting of 0 disables the automatic zero-detect mute table 118. submix mode enable bit r/w rst name description 7r/w 0 sme 0: submix into left/right disabled 1: submix into left/right enabled d7 d6 d5 d4 d3 d2 d1 d0 sve zce reserved pwms ame nsbw reserved reserved 10000010
register description: sound terminal compatibility STA381BW 114/171 doc id 018835 rev 7 7.5.1 noise-shaper bandwidth selection 7.5.2 am mode enable the STA381BW features an ffx processing mode that minimizes the amount of noise generated in the frequency range of am radio. this mode is intended for use when ffx is operating in a device with an active am tuner. the snr of the ffx processing is reduced to approximately 83 db in this mode, which is still greater than the snr of am radio. 7.5.3 pwm speed mode 7.5.4 zero-crossing enable the zce bit enables zero-crossing adjustment. when volume is adjusted on digital zero- crossing, no clicks are audible. 7.5.5 soft volume update enable table 119. noise-shaper bandwidth selection bit r/w rst name description 2 r/w 0 nsbw 1: third order ns 0: fourth order ns table 120. am mode enable bit r/w rst name description 3r/w 0 ame 0: normal ffx operation 1: am reduction mode ffx operation table 121. pwm speed mode bit r/w rst name description 4r/w 0 pwms 0: normal speed (384 khz) all channels 1: odd speed (341.3 khz) all channels. not suitable for binary btl mode. table 122. zero-crossing enable bit r/w rst name description 6r/w 0 zce ?1?: volume adjustments only occur at digital zero-crossing ?0?: volume adjustments occur immediately table 123. soft volume update enable bit r/w rst name description 7r/w 1 sve 1: volume adjustments ramp according to svr settings 0: volume adjustments occur immediately
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 115/171 7.6 configuration register f (addr 0x05) 7.6.1 output configuration note: to the left of the arrow is the processing channel. when using channel output mapping, any of the three processing channel outputs can be used for any of the three inputs. d7 d6 d5 d4 d3 d2 d1 d0 eapd pwdn reserved ldte bcle ide ocfg1 ocfg0 01011100 table 124. output configuration bit r/w rst name description 0 r/w 0 ocfg0 selects the output configuration 1 r/w 0 ocfg1 table 125. output configuration engine selection ocfg[1:0] output conf iguration pbtl enable 00 2-channel (full-bridge) power, 2-channel data-out: 1a/1b 1a/1b 2a/2b 2a/2b lineout1 3a/3b lineout2 4a/4b line out configuration determined by loc register no 01 2(half-bridge).1(full-bridge) on-board power: 1a 1a binary 0 2a 1b binary 90 3a/3b 2a/2b binary 45 1a/b 3a/b binary 0 2a/b 4a/b binary 90 no 10 2-channel (full-bridge) power, 1-channel ffx: 1a/1b 1a/1b 2a/2b 2a/2b 3a/3b 3a/3b eapdext and twarnext active no 11 1-channel mono-parallel: 3a 1a/1b w/ c3bo 45 3b 2a/2b w/ c3bo 45 1a/1b 3a/3b 2a/2b 4a/4b ye s
register description: sound terminal compatibility STA381BW 116/171 doc id 018835 rev 7 figure 31. ocfg = 00 (default value) figure 32. ocfg = 01 figure 33. ocfg = 10 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 lpf lineo u t1 out 3 b lpf lineo u t2 out4b out4a out 3 a h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 lpf lineo u t1 out 3 b lpf lineo u t2 out4b out4a out 3 a h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 ch a nnel 1 ch a nnel 2 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 ch a nnel 1 ch a nnel 2 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 power device out 3 b out 3 a eapd ch a nnel 3 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 2 ch a nnel 1 power device out 3 b out 3 a eapd ch a nnel 3
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 117/171 figure 34. ocfg = 11 the STA381BW can be configured to support different output configurations. for each pwm output channel a pwm slot is defined. a pwm sl ot is always 1 / (8 * fs) seconds length. the pwm slot defines the maximum extension for the pwm rising and falling edge, that is, the rising edge as well as the falling edge ca nnot range outside th e pwm slot boundaries. figure 35. output mapping scheme h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 out 3 b out4b out4a out 3 a ch a nnel 1 ch a nnel 2 h a lf bridge h a lf bridge h a lf bridge h a lf bridge out1a out1b out2a out2b ch a nnel 3 out 3 b out4b out4a out 3 a ch a nnel 1 ch a nnel 2 ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx ? mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b ffx mo d u l a tor remap ffx1a ffx1 b ffx2 a ffx 2b out1a out1b out2a out2b power bridg e out1a out1b out2a out2 b ffx 3 a ffx 3 b ffx4 a ffx 4b out 3 a out 3 b out4a out4b tm
register description: sound terminal compatibility STA381BW 118/171 doc id 018835 rev 7 for each configuration the pwm signals from the digital driver are mapped in different ways to the power stage: 2.0 channels, two full-bridges (ocfg = 00) ffx1a -> out1a ffx1b -> out1b ffx2a -> out2a ffx2b -> out2b ffx3a -> out3a ffx3b -> out3b ffx4a -> out4a ffx4b -> out4b ffx1a/1b configured as c1b0 (default: ternary) ffx2a/2b configured as c2b0 (default: ternary) ffx3a/3b configured as c3b0 (default: ternary) line out ffx4a/4b configured as c4b0 (default: ternary) line out on channel 3 line out (loc bits = 00) the same data as channel 1 processing is sent. on channel 4 line out (loc bits = 00) the same data as channel 2 processing is sent. in this configuration, neither volume control nor eq has any effect on channels 3 and 4. in this configuration the pwm slot phase is the following as shown in figure 36 . figure 36. 2.0 channels (ocfg = 00) pwm slots out1a out1b out2a out2b out 3 a out 3 b out4a out4b out1a out1b out2a out2b out 3 a out 3 b out4a out4b
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 119/171 2.1 channels, two half-bridges + one full-bridge (ocfg = 01) ffx1a -> out1a ffx2a -> out1b ffx3a -> out2a ffx3b -> out2b ffx1a -> out3a ffx1b -> out3b ffx2a -> out4a ffx2b -> out4b ffx1a/1b configured as binary ffx2a/2b configured as binary ffx3a/3b configured as binary ffx4a/4b is not used in this configuration, channel 3 has full control (volume, eq, etc?). on out3/out4 channels channel 1 and channel 2 pwm are replicated. in this configuration the pwm slot phase is the following as shown in figure 37 . figure 37. 2.1 channels (ocfg = 01) pwm slots out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out1a out2a out2b out 3 a out 3 b out1b out4a out4b out1a out2a out2b out 3 a out 3 b out1b out4a out4b
register description: sound terminal compatibility STA381BW 120/171 doc id 018835 rev 7 2.1 channels, two full-bridges + one external full-bridge (ocfg = 10) ffx1a -> out1a ffx1b -> out1b ffx2a -> out2a ffx2b -> out2b ffx3a -> out3a ffx3b -> out3b eapd -> out4a twarn -> out4b ffx1a/1b configured as c1b0 (default: ternary) ffx2a/2b configured as c2b0 (default: ternary) ffx3a/3b configured as c3b0 (default: ternary) ffx4a/4b is not used in this configuration, channel 3 has full control (volume, eq, etc?). on out4 channel the external bridge control signals are muxed. in this configuration the pwm slot phase is the following as shown in figure 38 . figure 38. 2.1 channels (ocfg = 10) pwm slots out1a out1b out2a out2b out 3 a out 3 b out1a out1b out2a out2b out 3 a out 3 b out1a out1b out2a out2b out 3 a out 3 b out1a out1b out2a out2b out 3 a out 3 b
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 121/171 7.6.2 invalid input detect mute enable setting the ide bit enables this function, which looks at the input i 2 s data and automatically mutes if the signals are perceived as invalid. 7.6.3 binary output mode clock loss detection this bit detects loss of input mclk in binary mode and will ou tput 50% duty cycle. 7.6.4 lrck double trigger protection this bit actively prevents double triggering of lrclk. 7.6.5 ic power-down the pwdn register is used to place the ic in a low-power state. when pwdn is written as 0, the output begins a soft-mute. after the mute condition is reached, eapd is asserted to power down the power stage, then the master clock to all internal hardware except the i 2 c block is gated. this places the ic in a very low power consumption state. 7.6.6 external amplifier power-down table 126. invalid input detect mute enable bit r/w rst name description 2 r/w 1 ide setting of 1 enables the automatic invalid input detect mute table 127. binary output mode clock loss detection bit r/w rst name description 3 r/w 1 bcle binary output mode clock loss detection enable table 128. lrck double trigger protection bit r/w rst name description 4 r/w 1 ldte lrclk double trigger protection enable table 129. ic power-down bit r/w rst name description 7r/w 1 pwdn 0: ic power-down low-power condition 1: ic normal operation table 130. external amplifier power-down bit r/w rst name description 7 r/w 0 eapd 0: external power stage power-down active 1: normal operation
register description: sound terminal compatibility STA381BW 122/171 doc id 018835 rev 7 the eapd register directly disables/enables the internal power circuitry. when eapd = 0, the internal power section is placed in a low-power state (disabled). this register also controls the eapd/f fx4b output pin when ocfg = 10. 7.7 volume control regi sters (addr 0x06 - 0x0a) 7.7.1 mute/line output configuration register line output is only active when ocfg = 00. in this case loc determines the line output configuration. the source of the line output is always channel 1 and 2 inputs. table 132. mute configuration d7 d6 d5 d4 d3 d2 d1 d0 loc1 loc0 reserved bqball c3m c2m c1m mmute 00000000 table 131. line output configuration loc[1:0] line output configuration 00 line output fixed - no volume, no eq 01 line output variable - ch3 volume effects line output, no eq 10 line output variable with eq - ch3 volume effects line output 11 reserved bit r/w rst name description 4 r/w 0 bqball global biquad bypass 0: biquad filters active 1: all the biquad filters ar e bypassed (pass-through) bit r/w rst name description 3r/w 0 c3m channel 3 mute 0 - no mute condition. it is possible to set the channel volume 1 - channel 3 in hardware mute 2r/w 0 c2m channel 2 mute 0 - no mute condition. it is possible to set the channel volume 1 - channel 2 in hardware mute
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 123/171 7.7.2 master volume register 7.7.3 channel 1 volume 7.7.4 channel 2 volume 7.7.5 channel 3 / line output volume the volume structure of the STA381BW consists of individual volume registers for each channel and a master volume register that provides an offset to each channel?s volume setting. the individual channel volumes are adjustable in 0.5 db steps from +48 db to -80 db. as an example if ch3vol = 0x00 or +48 db and mvol = 0x18 or -12 db, then the total gain for channel 3 = +36 db. the master mute, when set to 1, mutes all channels at once, whereas the individual channel mute (cxm) mutes only that channel. both the master mute and the channel mutes provide a ?soft mute? with the volume ramping down to mute in 4096 samples from the maximum volume setting at the internal processing rate (approximately 96 khz). a ?hard (instantaneous) mute? can be obtained by programming a value of 0xff (255) to any channel volume register or the master volume register. when volume offsets are 1r/w 0 c1m channel 1 mute 0 - no mute condition. it is possible to set the channel volume 1 - channel 1 in hardware mute 0 r/w 0 mmute master mute 0 - normal operation 1 - all channels are in mute condition bit r/w rst name description d7 d6 d5 d4 d3 d2 d1 d0 mvol[7:0] 11111111 d7 d6 d5 d4 d3 d2 d1 d0 ch1vol[7:0] 01100000 d7 d6 d5 d4 d3 d2 d1 d0 ch2vol[7:0] 01100000 d7 d6 d5 d4 d3 d2 d1 d0 ch3vol[7:0] 01100000
register description: sound terminal compatibility STA381BW 124/171 doc id 018835 rev 7 provided via the master volume register, any channel whose total volu me is less than -80 db is muted. all changes in volume take place at zero-crossings when zce = 1 ( configuration register e (addr 0x04) ) on a per-channel basis as this creates the smoothest possible volume transitions. when zce = 0, volume updates occur immediately. 7.8 audio preset registers (addr 0x0c) 7.8.1 audio preset r egister (addr 0x0c) table 133. master volume offset as a function of mvol[7:0] mvol[7:0] volume offset from channel value 00000000 (0x00) 0 db 00000001 (0x01) -0.5 db 00000010 (0x02) -1 db ?? 01001100 (0x4c) -38 db ?? 11111110 (0xfe) -127.5 db 11111111 (0xff) hard master mute table 134. channel volume as a function of cxvol[7:0] cxvol[7:0] volume 00000000 (0x00) +48 db 00000001 (0x01) +47.5 db 00000010 (0x02) +47 db ?? 01011111 (0x5f) +0.5 db 01100000 (0x60) 0 db 01100001 (0x61) -0.5 db ?? 11010111 (0xd7) -59.5 db 11011000 (0xd8) -60 db 11011001 (0xd9) -61 db 11011010 (0xda) -62 db ?? 11101100 (0xec) -80 db 11101101 (0xed) hard channel mute ?? 11111111 (0xff) hard channel mute d7 d6 d5 d4 d3 d2 d1 d0 xo3 xo2 xo1 xo0 amam2 amam1 amam0 amame
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 125/171 7.8.2 am interference frequency switching 7.8.3 bass management crossover 00000000 d7 d6 d5 d4 d3 d2 d1 d0 table 135. am interference frequency switching bits bit r/w rst name description 0 r/w 0 amame audio preset am enable 0: switching frequency determined by pwms setting 1: switching frequency determined by amam settings table 136. audio preset am switching frequency selection amam[2:0] 48 khz/96 khz input fs 44.1 khz/88.2 khz input fs 000 0.535 mhz - 0.720 mhz 0.535 mhz - 0.670 mhz 001 0.721 mhz - 0.900 mhz 0.671 mhz - 0.800 mhz 010 0.901 mhz - 1.100 mhz 0.801 mhz - 1.000 mhz 011 1.101 mhz - 1.300 mhz 1.001 mhz - 1.180 mhz 100 1.301 mhz - 1.480 mhz 1.181 mhz - 1.340 mhz 101 1.481 mhz - 1.600 mhz 1.341 mhz - 1.500 mhz 110 1.601 mhz - 1.700 mhz 1.501 mhz - 1.700 mhz table 137. bass management crossover bit r/w rst name description 4r/w 0 xo0 selects the bass management crossover frequency. a 1 st -order high-pass filter (channels 1 and 2) or a 2 nd -order low-pass filter (ch annel 3) at the selected frequency is performed. 5r/w 0 xo1 6r/w 0 xo2 7r/w 0 xo3
register description: sound terminal compatibility STA381BW 126/171 doc id 018835 rev 7 7.9 channel configuration registers (addr 0x0e - 0x10) 7.9.1 tone control bypass tone control (bass/treble) can be bypassed on a per-channel basis for channels 1 and 2. table 138. bass management crossover frequency xo[3:0] crossover frequency 0000 user-defined 0001 80 hz 0010 100 hz 0011 120 hz 0100 140 hz 0101 160 hz 0110 180 hz 0111 200 hz 1000 220 hz 1001 240 hz 1010 260 hz 1011 280 hz 1100 300 hz 1101 320 hz 1110 340 hz 1111 360 hz d7 d6 d5 d4 d3 d2 d1 d0 c1om1 c1om0 c1ls1 c1ls0 c1bo c1vpb c1eqbp c1tcb 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c2om1 c2om0 c2ls1 c2ls0 c2bo c2vpb c2eqbp c2tcb 01000000 d7 d6 d5 d4 d3 d2 d1 d0 c3om1 c3om0 c3ls1 c3ls0 c3bo c3vpb reserved reserved 10000000 table 139. tone control bypass cxtcb mode 0 perform tone control on channel x - normal operation 1 bypass tone control on channel x
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 127/171 7.9.2 eq bypass eq control can be bypassed on a per-channel basis for channels 1 and 2. if eq control is bypassed on a given channel, the prescale and all filters (biquads, bass, treble in any combination) are bypassed for that channel. 7.9.3 volume bypass each channel contains an individual channel volume bypass. if a particular channel has volume bypassed via the cxvbp = 1 register, then only the channel volume setting for that particular channel affects the volume setting, the master volu me setting will not affect that channel. table 141. volume bypass register 7.9.4 binary output enable registers each individual channel output can be set to output a binary pwm stream. in this mode output a of a channel is considered the positive output and output b is the negative inverse. 7.9.5 limiter select limiter selection can be made on a per-channel basis according to the channel limiter select bits. cxls bits are considered in case of dual-band drc and eqdrc usage ( 7.16.1 ). table 140. eq bypass cxeqbp mode 0 perform eq on channel x - normal operation 1 bypass eq on channel x cxvbp mode 0 normal volume operations 1 volume is bypassed table 142. binary output enable registers cxbo mode 0 ffx 3-state output - normal operation 1 binary output table 143. channel limiter mapping as a function of cxls bits cxls[1:0] channel limiter mapping 00 channel has limiting disabled 01 channel is mapped to limiter #1 10 channel is mapped to limiter #2
register description: sound terminal compatibility STA381BW 128/171 doc id 018835 rev 7 7.9.6 output mapping output mapping can be performed on a per-channel basis according to the cxom channel output mapping bits. each input into the output configuration engine can receive data from any of the three processing channel outputs. . 7.10 tone control register (addr 0x11) 7.10.1 tone control table 144. channel output mapping as a function of cxom bits cxom[1:0] channel x output source from 00 channel1 01 channel 2 10 channel 3 d7 d6 d5 d4 d3 d2 d1 d0 ttc3 ttc2 ttc1 ttc0 btc3 btc2 btc1 btc0 01110111 table 145. tone control boost/cut as a function of btc and ttc bits btc[3:0]/ttc[3:0] boost/cut 0000 -12 db 0001 -12 db ?? 0111 -4 db 0110 -2 db 0111 0 db 1000 +2 db 1001 +4 db ?? 1101 +12 db 1110 +12 db 1111 +12 db
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 129/171 7.11 dynamic control registers (addr 0x12 - 0x15) 7.11.1 limiter 1 attack/release rate 7.11.2 limiter 1 attack/release threshold 7.11.3 limiter 2 attack/release rate 7.11.4 limiter 2 attack/release threshold the STA381BW includes two independent limiter blocks (not to be mistaken with the stcompressor tm , for further details about this feature please refer to section 4.2 ). the purpose of the limiters is to automatically reduce the dynamic range of a recording to prevent the outputs from clipping in anticlipping mode or to actively reduce the dynamic range for a better listening environment such as a nighttime listening mode which is often needed for dvds. the two modes are selected via the drc bit in configuration register e (addr 0x04) on page 113 . each channel can be mapped to either limiter or not mapped, meaning that the channel will clip when 0 dbfs is exceeded. each limiter looks at the present value of each channel that is mapped to it, selects the maximum absolute value of all these channels, performs the limiting algorithm on that value, and then, if needed, adjusts the gain of the mapped channels in unison. the limiter attack thresholds are determined by the lxat registers if the eathx[7] bits are set to 0, else the thresholds are determined by eathx[6:0]. it is recommended in anticlipping mode to set this to 0 dbfs, which corresponds to the maximum unclipped output power of an ffx amplifier. since gain can be added digitally within the STA381BW, it is possible to exceed 0 dbfs or any other lxat setting. when this occurs, the limiter, when active, automatically starts reducing the gain. the rate at which the gain is reduced when the attack threshold is exceeded is dependent upon the attack rate register setting for that limiter. gain reduction occurs on a peak-detect algorithm. setting the eathx[7] bits to 1 selects the anticlipping mode. the limiter release thresholds are determined by the lxrt registers if the erthx[7] bits are set to 0, else the thresholds are determined by erthx[6:0]. settings the erthx[7] bits to 1 d7 d6 d5 d4 d3 d2 d1 d0 l1a3 l1a2 l1a1 l1a0 l1r3 l1r2 l1r1 l1r0 01101010 d7 d6 d5 d4 d3 d2 d1 d0 l1at3 l1at2 l1at1 l1at0 l1rt3 l1rt2 l1rt1 l1rt0 01101001 d7 d6 d5 d4 d3 d2 d1 d0 l2a3 l2a2 l2a1 l2a0 l2r3 l2r2 l2r1 l2r0 01101010 d7 d6 d5 d4 d3 d2 d1 d0 l2at3 l2at2 l2at1 l2at0 l2rt3 l2rt2 l2rt1 l2rt0 01101001
register description: sound terminal compatibility STA381BW 130/171 doc id 018835 rev 7 automatically selects the anticlipping mode. the release of the limiter, when the gain is again increased, is dependent on an rms-detect algorithm. the output of the volume/limiter block is passed through an rms filter. the output of this filter is compared to the release threshold, determined by the release threshold register. when the rms filter output falls below the release threshold, the gain is again increased at a rate dependent upon the release rate register. the gain can never be increased past its set value and, therefore, the release only occurs if the limiter has already reduced the gain. the release threshold value can be used to set what is effectively a minimum dynamic range, this is helpful as overlimiting can reduce the dynamic range to virtually zero and cause program material to sound ?lifeless?. in ac mode, the attack and re lease thresholds are set relati ve to full-scale. in drc mode, the attack threshold is set relative to the maximum volume setting of the channels mapped to that limiter, and the release threshold is set relative to the maximum volume setting plus the attack threshold.
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 131/171 figure 39. basic limiter and volume flow diagram table 146. limiter attack rate as a function of lxa bits table 147. limiter release rate as a function of lxr bits lxa[3:0] attack rate db/ms lxr[3:0] release rate db/ms 0000 3.1584 fast slow 0000 0.5116 fast slow 0001 2.7072 0001 0.1370 0010 2.2560 0010 0.0744 0011 1.8048 0011 0.0499 0100 1.3536 0100 0.0360 0101 0.9024 0101 0.0299 0110 0.4512 0110 0.0264 0111 0.2256 0111 0.0208 1000 0.1504 1000 0.0198 1001 0.1123 1001 0.0172 1010 0.0902 1010 0.0147 1011 0.0752 1011 0.0137 1100 0.0645 1100 0.0134 1101 0.0564 1101 0.0117 1110 0.0501 1110 0.0110 1111 0.0451 1111 0.0104 g a in + atten ua tion sa t u r a tio n rm s g a in / vol u me in p u t limiter o u tp u t
register description: sound terminal compatibility STA381BW 132/171 doc id 018835 rev 7 anticlipping mode table 148. limiter attack threshold as a function of lxat bits (ac mode) table 149. limiter release threshold as a function of lxrt bits (ac mode) lxat[3:0] ac (db relative to fs) lxr t[3:0] ac (db relative to fs) 0000 -12 0000 - 0001 -10 0001 -29 db 0010 -8 0010 -20 db 0011 -6 0011 -16 db 0100 -4 0100 -14 db 0101 -2 0101 -12 db 0110 0 0110 -10 db 0111 +2 0111 -8 db 1000 +3 1000 -7 db 1001 +4 1001 -6 db 1010 +5 1010 -5 db 1011 +6 1011 -4 db 1100 +7 1100 -3 db 1101 +8 1101 -2 db 1110 +9 1110 -1 db 1111 +10 1111 -0 db
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 133/171 dynamic range compression mode 7.11.5 limiter 1 extended at tack threshold (addr 0x32) the extended attack threshold value is determined as follows: attack threshold = -12 + eath1 / 4 to enable this feature, the eathen1 bit must be set to 1. 7.11.6 limiter 1 extended re lease threshold (addr 0x33) the extended release threshold value is determined as follows: release threshold = -12 + erth1 / 4 to enable this feature, the erthen2 bit must be set to 1. table 150. limiter attack threshold as a function of lxat bits (drc mode) table 151. limiter release threshold as a function of lxrt bits (drc mode) lxat[3:0] drc (db relative to volume) lxrt[3:0] drc (db relative to volume + lxat) 0000 -31 0000 - 0001 -29 0001 -38 db 0010 -27 0010 -36 db 0011 -25 0011 -33 db 0100 -23 0100 -31 db 0101 -21 0101 -30 db 0110 -19 0110 -28 db 0111 -17 0111 -26 db 1000 -16 1000 -24 db 1001 -15 1001 -22 db 1010 -14 1010 -20 db 1011 -13 1011 -18 db 1100 -12 1100 -15 db 1101 -10 1101 -12 db 1110 -7 1110 -9 db 1111 -4 1111 -6 db d7 d6 d5 d4 d3 d2 d1 d0 eathen1 eath1[6] eath1[5] eath1[4] eath1[3] eath1[2] eath1[1] eath1[0] 00110000 d7 d6 d5 d4 d3 d2 d1 d0 erthen1 erth1[6] erth1[5] erth1[4] erth1[3] erth1[2] erth1[1] erth1[0] 00110000
register description: sound terminal compatibility STA381BW 134/171 doc id 018835 rev 7 7.11.7 limiter 2 extended at tack threshold (addr 0x34) the extended attack threshold value is determined as follows: attack threshold = -12 + eath2 / 4 to enable this feature, the eathen2 bit must be set to 1. 7.11.8 limiter 2 extended re lease threshold (addr 0x35) the extended release threshold value is determined as follows: release threshold = -12 + erth2 / 4 to enable this feature, the erthen2 bit must be set to 1. note: attack/release threshold step is 0.125 db in the range -12 db to 0 db. 7.12 user-defined coefficient cont rol registers (addr 0x16 - 0x26) 7.12.1 coefficient address register 7.12.2 coefficient b1 data register bits 23:16 7.12.3 coefficient b1 dat a register bits 15:8 7.12.4 coefficient b1 dat a register bits 7:0 d7 d6 d5 d4 d3 d2 d1 d0 eathen2 eath2[6] eath2[5] eath2[4] eath2[3] eath2[2] eath2[1] eath2[0] 00110000 d7 d6 d5 d4 d3 d2 d1 d0 erthen2 erth2[6] erth2[5] erth2[4] erth2[3] erth2[2] erth2[1] erth2[0] 00110000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved cfa5 cfa4 cfa3 cfa2 cfa1 cfa0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b23 c1b22 c1b21 c1b20 c1b19 c1b18 c1b17 c1b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b15 c1b14 c1b13 c1b12 c1b11 c1b10 c1b9 c1b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b7 c1b6 c1b5 c1b4 c1b3 c1b2 c1b1 c1b0 00000000
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 135/171 7.12.5 coefficient b2 data register bits 23:16 7.12.6 coefficient b2 dat a register bits 15:8 7.12.7 coefficient b2 dat a register bits 7:0 7.12.8 coefficient a1 data register bits 23:16 7.12.9 coefficient a1 dat a register bits 15:8 7.12.10 coefficient a1 dat a register bits 7:0 7.12.11 coefficient a2 dat a register bits 23:16 d7 d6 d5 d4 d3 d2 d1 d0 c2b23 c2b22 c2b21 c2b20 c2b19 c2b18 c2b17 c2b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c2b15 c2b14 c2b13 c2b12 c2b11 c2b10 c2b9 c2b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c2b7 c2b6 c2b5 c2b4 c2b3 c2b2 c2b1 c2b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c1b23 c1b22 c1b21 c1b20 c1b19 c1b18 c1b17 c1b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c3b15 c3b14 c3b13 c3b12 c3b11 c3b10 c3b9 c3b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c3b7 c3b6 c3b5 c3b4 c3b3 c3b2 c3b1 c3b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c4b23 c4b22 c4b21 c4b20 c4b19 c4b18 c4b17 c4b16 00000000
register description: sound terminal compatibility STA381BW 136/171 doc id 018835 rev 7 7.12.12 coefficient a2 dat a register bits 15:8 7.12.13 coefficient a2 dat a register bits 7:0 7.12.14 coefficient b0 dat a register bits 23:16 7.12.15 coefficient b0 dat a register bits 15:8 7.12.16 coefficient b0 dat a register bits 7:0 7.12.17 coefficient write /read control register coefficients for user-defined eq, mixing, scaling, bass management and stcompressor tm (see section 4.2 ) are handled internally in the STA381BW via ram. access to this ram is available to the user via an i 2 c register interface. a collection of i 2 c registers are dedicated to this function. one contains a coefficient base address, five sets of three store the values of the 24-bit coefficients to be written or that were read, and one contains bits used to control the write/read of the coefficient(s) to/from ram. note: the read and write operation on ram coefficients works only if lrcki (pin 29) is switching. d7 d6 d5 d4 d3 d2 d1 d0 c4b15 c4b14 c4b13 c4b12 c4b11 c4b10 c4b9 c4b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c4b7 c4b6 c4b5 c4b4 c4b3 c4b2 c4b1 c4b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c5b23 c5b22 c5b21 c5b20 c5b19 c5b18 c5b17 c5b16 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c5b15 c5b14 c5b13 c5b12 c5b11 c5b10 c5b9 c5b8 00000000 d7 d6 d5 d4 d3 d2 d1 d0 c5b7 c5b6 c5b5 c5b4 c5b3 c5b2 c5b1 c5b0 00000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved ra r1 wa w1 0 0000
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 137/171 reading a coefficient from ram 1. write 6 bits of the address to i 2 c register 0x16. 2. write 1 to the r1 bit in i 2 c address 0x26. 3. read the top 8 bits of the coefficient in i 2 c address 0x17. 4. read the middle 8 bits of the coefficient in i 2 c address 0x18. 5. read the bottom 8 bits of the coefficient in i 2 c address 0x19. reading a set of coefficients from ram 1. write 6 bits of the address to i 2 c register 0x16. 2. write 1 to the ra bit in i 2 c address 0x26. 3. read the top 8 bits of the coefficient in i 2 c address 0x17. 4. read the middle 8 bits of the coefficient in i 2 c address 0x18. 5. read the bottom 8 bits of the coefficient in i 2 c address 0x19. 6. read the top 8 bits of coefficient b2 in i 2 c address 0x1a. 7. read the middle 8 bits of coefficient b2 in i 2 c address 0x1b. 8. read the bottom 8 bits of coefficient b2 in i 2 c address 0x1c. 9. read the top 8 bits of coefficient a1 in i 2 c address 0x1d. 10. read the middle 8 bits of coefficient a1 in i 2 c address 0x1e. 11. read the bottom 8 bits of coefficient a1 in i 2 c address 0x1f. 12. read the top 8 bits of coefficient a2 in i 2 c address 0x20. 13. read the middle 8 bits of coefficient a2 in i 2 c address 0x21. 14. read the bottom 8 bits of coefficient a2 in i 2 c address 0x22. 15. read the top 8 bits of coefficient b0 in i 2 c address 0x23. 16. read the middle 8 bits of coefficient b0 in i 2 c address 0x24. 17. read the bottom 8 bits of coefficient b0 in i 2 c address 0x25. writing a single coefficient to ram 1. write 6 bits of the address to i 2 c register 0x16. 2. write the top 8 bits of the coefficient in i 2 c address 0x17. 3. write the middle 8 bits of the coefficient in i 2 c address 0x18. 4. write the bottom 8 bits of the coefficient in i 2 c address 0x19. 5. write 1 to the w1 bit in i 2 c address 0x26.
register description: sound terminal compatibility STA381BW 138/171 doc id 018835 rev 7 writing a set of coefficients to ram 1. write 6 bits of the starting address to i 2 c register 0x16. 2. write the top 8 bits of coefficient b1 in i 2 c address 0x17. 3. write the middle 8 bits of coefficient b1 in i 2 c address 0x18. 4. write the bottom 8 bits of coefficient b1 in i 2 c address 0x19. 5. write the top 8 bits of coefficient b2 in i 2 c address 0x1a. 6. write the middle 8 bits of coefficient b2 in i 2 c address 0x1b. 7. write the bottom 8 bits of coefficient b2 in i 2 c address 0x1c. 8. write the top 8 bits of coefficient a1 in i 2 c address 0x1d. 9. write the middle 8 bits of coefficient a1 in i 2 c address 0x1e. 10. write the bottom 8 bits of coefficient a1 in i 2 c address 0x1f. 11. write the top 8 bits of coefficient a2 in i 2 c address 0x20. 12. write the middle 8 bits of coefficient a2 in i 2 c address 0x21. 13. write the bottom 8 bits of coefficient a2 in i 2 c address 0x22. 14. write the top 8 bits of coefficient b0 in i 2 c address 0x23. 15. write the middle 8 bits of coefficient b0 in i 2 c address 0x24. 16. write the bottom 8 bits of coefficient b0 in i 2 c address 0x25. 17. write 1 to the wa bit in i 2 c address 0x26. the mechanism for writing a set of coefficients to ram provides a method of updating the five coefficients corresponding to a given biquad (filter) simultaneously to avoid possible unpleasant acoustic side effects. when using this technique, the 6-bit address specifies the address of the biquad b1 coefficient (for example, 0, 5, 10, 20, 35 decimal), and the STA381BW generates the ram addresses as offsets from this base value to write the complete set of coefficient data.
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 139/171 7.12.18 user-defined eq the STA381BW can be programmed for four eq filters (biquads) per each of the two input channels. the biquads use the following equation: y[n] = 2 * (b 0 / 2) * x[n] + 2 * (b 1 / 2) * x[n-1] + b 2 * x[n-2] - 2 * (a 1 / 2) * y[n-1] - a 2 * y[n-2] = b 0 * x[n] + b 1 * x[n-1] + b 2 * x[n-2] - a 1 * y[n-1] - a 2 * y[n-2] where y[n] represents the output and x[n] represents the input. multipliers are 24-bit signed fractional multipliers, with coefficient values in the range of 0x800000 (-1) to 0x7fffff (0.9999998808). coefficients stored in the user-defined co efficient ram are referenced in the following manner: cxhy0 = b 1 / 2 cxhy1 = b 2 cxhy2 = -a 1 / 2 cxhy3 = -a 2 cxhy4 = b 0 / 2 where x represents the channel and y the biquad number. for example, c2h41 is the b 2 coefficient in the fourth biquad for channel 2. additionally, the STA381BW can be programmed for a high-pass filter (processing channels 1 and 2) and a low-pass filter (processing channel 3) to be used for bass management crossover when the xo setting is 000 (user-defined). both of these filters, when defined by the user (rather than using the preset crossover filters), are second order filters that use the biquad equation given above. they are loaded into the c12h0-4 and c3hy0-4 areas of ram noted in table 150 . channel 1 and channel 2 biquads use by default the extended coefficient range (-4, +4); xover filters use only the standard coefficients range (-1, +1). by default, all user-defined filters are pass-through where all coefficients are set to 0, except the channel 1 and 2 b 0 /2 coefficient which is set to 0x100000 (representing 0.5) and xover b 0 /2 coefficient which is set to 0x400000 (representing 0.5). 7.12.19 pre-scale the STA381BW provides a multiplication for each input channel for the purpose of scaling the input prior to eq. this pre-eq scaling is accomplished by using a 24-bit signed fractional multiplier, with 0x800000 = -1 and 0x7fffff = 0.9999998808. the scale factor for this multiplication is loade d into ram using the same i 2 c registers as the biquad coefficients and the bass management. all chann els can use the channel-1 pre-scale factor by setting the biquad link bit. by default, all pre-scale factors are set to 0x7fffff. 7.12.20 post-scale the STA381BW provides one additional multiplication after the last interpolation stage and the distortion compensation on each channel. this post-scaling is accomplished by using a 24-bit signed fractional multiplier, with 0x800000 = -1 and 0x7fffff = 0.9999998808. the scale factor for this multiplication is loaded into ram using the same i 2 c registers as the biquad coefficients and the bass management. this post-scale factor can be used in conjunction with an adc-equipped microcontroller to perform power-supply error correction. all channels can use the channel-1 post-scale factor by setting the post-scale link bit. by
register description: sound terminal compatibility STA381BW 140/171 doc id 018835 rev 7 default, all post-scale factors are set to 0x7fffff. when line output is being used, channel-3 post-scale will affe ct both channels 3 and 4. table 152. ram block for biquads, mixing, scaling and bass management index (decimal) index (hex) description coefficient default 0 0x00 channel 1 - biquad 1 c1h10(b1/2) 0x000000 1 0x01 c1h11(b2) 0x000000 2 0x02 c1h12(a1/2) 0x000000 3 0x03 c1h13(a2) 0x000000 4 0x04 c1h14(b0/2) 0x400000 5 0x05 channel 1 - biquad 2 c1h20 0x000000 ?? ? ?? 19 0x13 channel 1 - biquad 4 c1h44 0x400000 20 0x14 channel 2 - biquad 1 c2h10 0x000000 21 0x15 c2h11 0x000000 ?? ? ?? 39 0x27 channel 2 - biquad 4 c2h44 0x400000 40 0x28 channel 1/2 - biquad 5 for xo = 000 high-pass 1 st order filter for xo 000 c12h0(b1/2) 0x000000 41 0x29 c12h1(b2) 0x000000 42 0x2a c12h2(a1/2) 0x000000 43 0x2b c12h3(a2) 0x000000 44 0x2c c12h4(b0/2) 0x400000 45 0x2d channel 3 - biquad for xo = 000 low-pass 2 nd order filter for xo 000 c3h0(b1/2) 0x000000 46 0x2e c3h1(b2) 0x000000 47 0x2f c3h2(a1/2) 0x000000 48 0x30 c3h3(a2) 0x000000 49 0x31 c3h4(b0/2) 0x400000 50 0x32 channel 1 - pre-scale c1pres 0x7fffff 51 0x33 channel 2 - pre-scale c2pres 0x7fffff 52 0x34 channel 1 - post-scale c1psts 0x7fffff 53 0x35 channel 2 - post-scale c2psts 0x7fffff 54 0x36 channel 3 - post-scale c3psts 0x7fffff 55 0x37 reserved reserved 0x5a9df7 56 0x38 channel 1 - mix 1 c1mx1 0x7fffff 57 0x39 channel 1 - mix 2 c1mx2 0x000000 58 0x3a channel 2 - mix 1 c2mx1 0x000000 59 0x3b channel 2 - mix 2 c2mx2 0x7fffff 60 0x3c channel 3 - mix 1 c3mx1 0x400000 61 0x3d channel 3 - mix 2 c3mx2 0x400000 62 0x3e unused 63 0x3f unused
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 141/171 7.13 fault-detect recovery constant registers (addr 0x2b - 0x2c) the fdrc bits specify the 16-bit fault-detect re covery time delay. when fault is asserted, the tristate output is immediately asserted low and held low for the time period specified by this constant. a constant value of 0x0001 in this register is approximately 0.083 ms. the default value of 0x300c gives approximately 1 sec. 0x0000 is a reserved value. 7.14 device status register (addr 0x2d) this read-only register provides fault and thermal-warning status information from the power control block. logic value 1 for faults or warning means normal state. logic 0 means a fault or warning detected on power bridge. the pllul = 1 means that the pll is not locked. 7.15 eq coefficients config uration register (addr 0x31) the xob bit can be used to bypass the crossover filters. logic 1 means that the function is not active. in this case, the high-pass crossover filter works as a pass-through on the data path (b=0, all the other coefficients at logic 0 ) while the low-pass filter is configured to have zero signal on channel 3 data processing (all the coefficients are at logic 0) . d7 d6 d5 d4 d3 d2 d1 d0 fdrc15 fdrc14 fdrc13 fdrc12 fdrc11 fdrc10 fdrc9 fdrc8 00110000 d7 d6 d5 d4 d3 d2 d1 d0 fdrc7 fdrc6 fdrc5 fdrc4 fdrc3 fdrc2 fdrc1 fdrc0 00001100 d7 d6 d5 d4 d3 d2 d1 d0 pllul fault reserved reserved reserved reserved reserved reserved table 153. status register bits bit r/w rst name description 7 r - pllul 0: pll locked 1: pll not locked 6r - fault 0: fault detected on power bridge 1: normal operation d7 d6 d5 d4 d3 d2 d1 d0 xob reserved reserved reserved reserved reserved reserved reserved 00000000
register description: sound terminal compatibility STA381BW 142/171 doc id 018835 rev 7 7.16 extended configurat ion register (addr 0x36) the extended configuration register provides access to b 2 drc and biquad 5, 6 and 7. 7.16.1 dual-band drc the STA381BW device provides a dual-band drc (b 2 drc) on the left and right channel data path, as depicted in figure 40 . the dual-band drc is activated by setting mdrce = 1. figure 40. b 2 drc scheme the low-frequency information (lfe) is extracted from the left and right channels, removing the high frequencies using a programmable biquad filter, and then computing the difference with the original signal. limiter 1 (drc1) is then used to control the amplitude of the left/right high-frequency components, while limiter 2 (drc2) is used to control the low- frequency components (see chapter 7.11 ). the cutoff frequency of the high-pass filters can be user-defined, xo[3:0] = 0, or selected from the pre-defined values. drc1 and drc2 are then used to independentl y limit l/r high frequencies and lfe channel amplitude (see chapter 7.11 ) as well as their volume control. to be noted that, in this configuration, the dedicated channel 3 volu me control can actually act as a bass-boost enhancer as well (0.5 db/step resolution). the processed lfe channel is then recombined with the l and r channels in order to reconstruct the 2.0 output signal. d7 d6 d5 d4 d3 d2 d1 d0 mdrce reserved ps48db xar1 xar2 bq5 bq6 bq7 00000000 b 2 drc hi-p ass xo filter l r b 2 drc hi-p ass xo filter - ch a nnel 1 vol u me drc 1 ch a nnel 3 vo l u me drc 2 ++ - + ch a nnel 3 vol u me drc 2 ch a nnel 2 vo l u me drc 1 +
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 143/171 sub-band decomposition the sub-band decomposition for b 2 drc can be configured specifying the cutoff frequency. the cutoff frequency can be programmed in two ways, using the xo bits in register 0x0c, or using the ?user programmable? mode (coefficients stored in ram addresses 0x28 to 0x31). for the user-programmable mode, use the formulas below to compute the high-pass filters: where alpha = (1-sin( 0 ))/cos( 0 ), and 0 is the cutoff frequency. a first-order filter is suggested to guarantee that for every 0 the corresponding low-pass filter obtained as difference (as shown in figure 24 ) will have a symmetric (relative to the hp filter) frequency response, and the corresponding recombination after the drc has low ripple. second-order filters can be used as well, but in this case the filter shape must be carefully chosen to provide good low-pass response and minimum ripple recombination. for second-order filters, it is not possible to give a closed formula to get the best coefficients, but empirical adjustment should be done. drc settings the drc blocks used by b 2 drc are the same as those described in chapter 7.11 . b 2 drc configure automatically the drc blocks in anticlipping mode. attack and release thresholds can be selected using registers 0x32, 0x33, 0x34, 0x35, while attack and release rates are configured by registers 0x12 and 0x14. band downmixing the low-frequency band is down-mixed to the left and right channels at the b 2 drc output. channel volume can be used to weight the bands recombination to fine-tune the overall frequency response. 7.16.2 extended post-scale range table 154. extended post-scale range post-scale is an attenuation by default. when ps48db is set to 1, a 48-db offset is applied to the coefficient ram value, so post-scale can act as a gain too. b0 = (1 + alpha) / 2 a0 = 1 b1 = -(1 + alpha) / 2 a1 = -alpha b2 = 0 a2 = 0 ps48db mode 0 post-scale value is applied as defined in coefficient ram 1 post-scale value is applied with + 48 db offset with respect to the coefficient ram value
register description: sound terminal compatibility STA381BW 144/171 doc id 018835 rev 7 7.16.3 extended attack rate the attack rate shown in ta bl e 1 4 6 can be extended to provide up to an 8 db/ms attack rate on both limiters. table 155. extended attack rate, limiter 1 table 156. extended attack rate, limiter 2 7.16.4 extended biquad selector bass and treble controls can be configured as user-defined filters when the equalization coefficients link is activated (bql = 1) and the corresponding bqx bit is set to 1. table 157. extended biquad selector, biquad 5 table 158. extended biquad selector, biquad 6 table 159. extended biquad selector, biquad 7 when filters from the 5th to 7th are configured as user-programmable, the corresponding coefficients are stored respectively in addresses 0x20-0x24 (bq5), 0x25-0x29 (bq6), 0x2a- 0x2e (bq7) as given in table 152 . note: bqx bits are ignored if bql = 0 or if demp = 1 (relevant for bq5) or cxtcb = 1 (relevant for bq6 and bq7). xar1 mode 0 limiter1 attack rate is configured using ta b l e 1 4 6 1 limiter1 attack rate is 8 db/ms xar2 mode 0 limiter2 attack rate is configured using ta b l e 1 4 6 1 limiter2 attack rate is 8 db/ms bq5 mode 0 reserved 1 user-defined biquad 5 coefficients are selected bq6 mode 0 pre-set bass filter selected as per ta bl e 1 4 5 1 user-defined biquad 6 coefficients are selected bq7 mode 0 pre-set treble filter selected as per table 145 1 user-defined biquad 7 coefficients are selected
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 145/171 7.17 eq soft volume configurat ion registers (addr 0x37 - 0x38) the soft volume update has a fixed rate by default. using register 0x37 and 0x38 it is possible to override the default behavior, allowing different volume change rates. it is also possible to independently define the fade-in (volume is increased) and fade-out (volume is decreased) rates according to the desired behavior. table 160. soft volume update enable, increase when svupe = 1 the volume-up rate is defined by the svup[4:0] bits according to the following formula: volume-up rate = 48 / (n + 1) db/ms where n is the svup[4:0] value. table 161. soft volume update enable, decrease when svdwe = 1 the volume-down rate is defined by the svdw[4:0] bits according to the following formula: volume-down rate = 48 / (n + 1) db/ms where n is the svdw[4:0] value. note: for volume-down rates greater than 6 db/msec it is recommended to disable the cpwmen bit and zce bit in order to avoid any audible pop noise. d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved svupe svup[4] svup[3] svup[2] svup[1] svup[0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved svdwe svdw4] svdw[3] svdw[2] svdw[1] svdw[0] 00000000 svupe mode 0 when volume is increased, use the default rate 1 when volume is increased, use the rates defined by svup[4:0]. svdwe mode 0 when volume is decreased, use the default rate 1 when volume is decreased, use the rates defined by svdw[4:0].
register description: sound terminal compatibility STA381BW 146/171 doc id 018835 rev 7 7.18 extra volume resolution co nfiguration registers (address 0x3f; 0x40) extra volume resolution allows fine volume tuning by steps of 0.125 db. the feature is enabled when vresen=1, as depicted in figure 41 . the overall channel volume in this case will be cxvol+cxvr (in db), while the ma ster volume will be mvol+mvr (in db). figure 41. extra resolution volume scheme if vresen = 0 the channel volume will be defined only by th e cxvol registers. fine tuning steps can be set according to the following table for channels 1, 2,3, and master volume. table 162. volume fine-tuning steps d7 d6 d5 d4 d3 d2 d1 d0 vresen vrestg c3vr[1] c3vr[0] c2vr[1] c2vr[0] c1vr[1] c1vr[0] 10000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved reserved mvr[1] mvr[0] 00000000 cxvr/mvr mode 00 0 db 01 -0.125 db 10 -0.25 db 11 -0.375 db a u dio d a t a o u t cxvol s oft vol u me x x a u dio d a t a in vre s en vre s tg cxvr mvol or cxvol?event 1 0 0 1 a u dio d a t a o u t cxvol s oft vol u me x x a u dio d a t a in vre s en vre s tg cxvr mvol or cxvol ? event 1 0 0 1
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 147/171 two different behaviors can be configured by the vrestg bit. if vrestg=?0? the cxvr contribution will be ap plied immediately afte r the corresponding i 2 c bits are written. if vrestg=?1? the cxvr bits will be effe ctive on channel vo lume only after the corresponding cxvol register or master volume register is written (even to the previous values). table 163. extra volume resolution enable 7.19 pll configuration registers (a ddress 0x41; 0x42; 0x43; 0x44; 0x45; 0x46) by default the STA381BW is able to configure the embedded pll automatically depending on the mcs bits (reg 0x00). for certain applic ations and to provide fl exibility to the user, a manual pll configuration can be used (setting pll_dirp to ?1?). vresen vrestg mode 0 0 extra volume resolution disabled 0 1 extra volume resolution disabled 1 0 fine volume tuning enabled and applied immediately 11 fine volume tuning enabled and applied when master or channel volume is updated d7 d6 d5 d4 d3 d2 d1 d0 pll_frac[15:8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 pll_frac[7:0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 pll_dith[1:0] pll_ndiv[5:0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 pll_dpd pll_fct pll_stb pll_stbbyp pll_idiv(3:0) 00000000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved pll_dirp pll_pwd pll_byp osc_pd reserved boost32k 00000100 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved bypstate pdstate oscok lowck na na na na na na na na
register description: sound terminal compatibility STA381BW 148/171 doc id 018835 rev 7 the output pll frequency formula is: where fin is the input clock frequency from the pad. table 164. pll factors pll parameter min max frac 0 65535 idiv 0 3 ndiv 5 55 table 165. pll register 0x43 bits bit r/w rst name description 7r/w 0 pll_dith(1:0) ?00?: pll clock dithering disabled ?01?: pll clock dithering enabled (triangular)) ?10?: pll clock dithering enabled (rectangular) ?11?: reserved 6r/w 0 5r/w 0 ndiv pll loop divider 4r/w 0 3r/w 0 2r/w 0 1r/w 0 0r/w 0 table 166. pll register 0x44 bits bit r/w rst name description 7 r/w 0 pll_dpd ?0?: any pll dividers change is implemented via pll power-down ?1?: pll divider change will happen without pll power-down 6 r/w 0 pll_fct ?0?: pll use integer ratio ?1?: pll use fractional ratio 5 r/w 0 pll_stb pll synchronous divider changes strobe 4 r/w 0 pll_stbbyp ?0?: pll_stb is active ?1?: pll_stb control is bypassed 3r/w 0 pll_idiv (3:0) input pll divider 2r/w 0 1r/w 0 0r/w 0 fin ndiv () idiv 1 + () ------------ -------------- - frac 65536 ---------------- - ?? ?? + ?? ??
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 149/171 7.20 short-circuit protection mode registers shok (address 0x47) the following power bridge pins short-circuit protections are implemented in the STA381BW: outxx vs gndx outxx vs vccx out1b vs out2a the protection is enabl ed when reg. 0x4c bit 0 (shen) is set to ?1?. the protection will check the short-circuit when the eapd bit is toggled from ?0? to ?1? (i.e . the power bridge is switched on), and only if the test passes (no short) does the power bridge leave the tristate condition. register 0x47 (rea d-only registers) will give more inform ation about the detected short type. gndsh equal to ?0? means that outxx is shorted to ground, while the same value on vccsh means that outxx is shorted to vcc, finally outsh=?0? means that out1b is shorted to out2a. table 167. pll register 0x45 bits bit r/w rst name description 5 r/w 0 pll_dirp ?0?: pll configuration is determined by mcs bits ?1?: pll configuration is determined by frac, idiv and ndiv 4 r/w 0 pll_pwd ?0?: pll normal behavior ?1?: pll is in power-down mode 3 r/w 0 pll_byp ?0?: sys clock is from pll ?1?: sys clock is from external pin (pll is bypassed) 2r/w 0 osc_pd ?0?: normal behavior ?1?: internal oscillator is in power-down 0 r/w 0 boost32k ?0?: input oversampling selected by ir bits ?1?: input oversampling is selected x3 table 168. pll register 0x46 bits bit r/w rst name description 3 r bypstate pll bypass state 2 r pdstate pll pd state 1 r oscok osci locked 0 r lowck clock input frequency check d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved gndsh vccsh outsh na na na na na na na na
register description: sound terminal compatibility STA381BW 150/171 doc id 018835 rev 7 to be noted that once the check is performed, and the tristate released, the short protection is not active anymore until the next eapd 0- >1 toggling which means that shorts that happened during normal operation cannot be detected. to be noted that register 0x47 is meaningful only after the eapd bit is set to ?1? at least once. the short-circuit protections implemented are effective only in btl configuration, and they must not be activated if a single ended-application scheme is needed. figure 42. short-circuit detection timing diagram (no short detected) in figure 42 the short protection timing diagram is shown. the time information is expressed in clock cycles, where the clock frequency is defined as in section 7.1.1 . the gray color is used for the shokx bits to indicate that the bits are carrying the status of the previous eapd 0->1 toggling (to be noted that after reset this state is meaningless since no eapd transition occurs). gnd-related shok bits are updated as soon as the gnd test is completed, vcc bits are updated after the vcc test is completed, and the sout bit is updated after the shorted output test is completed. the gnd test, vcc test and output test are always run (if the shen bit active and eapd is toggled to ?1?), and on ly if both tests are successful (no short) do the bridge outputs leave the tristate (indicated by dotted lines in the figure). if one of the three tests (or all) fail, the power bridge outputs are kept in tristate until the procedure is restarte d with a new eapd toggling. in this figure eapd is intended to be bit 7 of register 0x05. eapd out1a out1b out2a out2b s hok1[7:4] s hok1[ 3 :0] s hok2[0] t s e t t r o h s f o d n e t s e t c c v t r a t s t s e t d n g t r a t s 44 cycle s 50005 cycle s 50005 cycle s 1cycle s t a rt o u t te s t tbd cycle s
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 151/171 7.21 extended coefficient range up to -4...4 (address 0x49, 0x4a) biquads from 1 to 7 have in the STA381BW th e possibility to extend the coefficient range from [-1,1) to [-4..4) which allows the implementation of high-shelf filters that may require a coefficient dynamic greater in absolute value than 1. three ranges are available, [-1;1) [-2;2) [-4;4). by default, the extended range is activated each biquad has its independent setting according to the following table. table 169. coefficients extended range configuration in this case the user can decide, for each filter stage, the right coefficients range. note that for a given biquad, the same range will be applied to the left and right (channel 1 and channel 2). crossover biquad does not have the availability of this feature, maintaining th e [-1;1) range unchanged. 7.22 miscellaneous register s (address 0x4b, 0x4c) 7.22.1 rate power-down enable ( rpdnen) bit (addre ss 0x4b, bit d7) in the STA381BW, by default, the power-down pin and i 2 c power-down act on mute commands to perform the fade-out. this default can be changed so that the fade-out can be started using master volume. the rpdnen bit, when set, activates this feature. d7 d6 d5 d4 d3 d2 d1 d0 cext_b4[1] cext_b4[0] cext_b3[1] cext_b3[0] cext_b2[1] cext_b2[0] cext_b1[1] cext_b1[0] 10101010 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved cext_b7[1] cext_b7[0] cext_b6[1] cext_b6[0] cext_b51] cext_b5[0] 00101010 cext_bx[1] cext_bx[0] range 00 [-1;1) 01 [-2;2) 10 [-4;4) 1 1 reserved d7 d6 d5 d4 d3 d2 d1 d0 rpdnen bridgoff cpwmen reserved 01100100 d7 d6 d5 d4 d3 d2 d1 d0 lpdp lpd lpde pndlsl[2] pndlsl[1] pndlsl[0] reserved shen 01001100
register description: sound terminal compatibility STA381BW 152/171 doc id 018835 rev 7 7.22.2 bridge immediately off (bri dgoff) bit (addre ss 0x4b, bit d5) a fade-out procedure is started in the STA381BW once the pwdn function is enabled, and after 13 million clock cycles (pll internal frequ ency) the bridge is put in power-down (tristate mode). there is also the possibility to change this behavior so that the power bridge will be switched off immediately after the pwdn pin is tied to ground, without waiting for the 13 million clock cycles. the bridgoff bit, when set, activates this function. obviously the immediate power-down will genera te a pop noise at the output , therefore th is procedure must be used only in case pop noise is not relevant in the application. note that this feature works only for hardware pwdn assertion and not for a power-down applied through the iic interface. refer to section 7.22.5 if programming a different number of clock cycles is needed. 7.22.3 channel pwm enable (cpwme n) bit (address 0x4b, bit d2) this bit, when set, activates a mute output in case the volume reaches a value lower than -76 dbfs. 7.22.4 external amplifier hardware pin enabler (lpdp, lpd lpde) bits (address 0x4c, bit d7, d6, d5) pin 42 (intline), normally indicating a fault condition, using the following 3 register settings, can be reconfigured as hardware pin enabler for an external headphone or line amplifier. in particular the lpde bit, when set, activates this function. accordingly, the lpd value (0 or 1) is exported on pin 42 and in case of power-down assertion, pin 42 is tied to lpdp. the lpdp bit, when set, negates the value programmed as the lpd value, refer to the following table. table 170. external amplifier enabler configuration bits lpdp lpd lpde pin 42 output x x0 int_line 0 01 0 0 11 1 1 01 1 1 11 0
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 153/171 figure 43. alternate function for intline pin 7.22.5 power-down delay selector (pndl sl[2:0]) bits (address 0x4c, bit d4, d3, d2) as per section 7.22.2 , the assertion of pwdn activates a counter that, by default, after 13 million clock cycles puts the power bridge in tristate mode, independently from the fade-out time. using these registers it is possible to program this counter according to the following table. table 171. pndlsl bits configuration 7.22.6 short-circuit check enable bit (address 0x4c, bit d0) this bit, when enable d, will activate the short-circuit checks before any power bridge activation (eapd bit 0->1). see section 7.20 for more details. y n ?0? lpd ?is the device in powerdown?? 0 1 lpdp 0 1 lpde power bridge fault in tline pndlsl[2] pndlsl[1] pndlsl[2] fade-out time 00 0 default time (13m pll clock cycles) 00 1 default time divided by 2 01 0 default time divided by 4 01 1 default time divided by 8 10 0 default time divided by 16 10 1 default time divided by 32 11 0 default time divided by 64 11 1 default time divided by 128
register description: sound terminal compatibility STA381BW 154/171 doc id 018835 rev 7 7.23 bad pwm detection register s (address 0x4d, 0x4e, 0x4f) the STA381BW implements a detection on the pwm outputs able to verify if the output signal has no zero-crossing in a configurable time window. this check can be useful to detect dc levels in the pwm outputs. to be noted that the checks are performed on logic level pwm (i.e. not the power bridge ones, nor the pwm on ddx3 and ddx4 i/os). in case of ternary modulation, the detection threshold is computed as: th=[(bpth*2+1)/128]*100% if the measured pwm duty cycle is detected greater than or equal to th for more than bptim pwm periods, the corresponding pwm bit will be set in register 0x4e. in case of binary modulation, there are two thresholds: th1=[(64+bpth)/128]*100% th2=[(64-bpth)/128]*100% in this case if the measured pwm duty cycle is outside the th1-th 2 range for more than bptim pwm periods, the corresponding bit will be set in register 0x4e. d7 d6 d5 d4 d3 d2 d1 d0 bpth[5] bpth[4] bpth[3] bpth[2] bpth[1] bpth[0] reserved reserved 00110010 d7 d6 d5 d4 d3 d2 d1 d0 bp4b bp4a bp3b bp3a bp2b bp2a bp1b bp1a 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bptim[7] bptim[6] bptim[5] bptim[4] bptim[3] bptim[2] bptim[1] bptim[0] 01011110
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 155/171 7.24 enhanced zero-detect mute and input level measurement (address 0x50-0x54, 0x2e, 0x2f and 0x5e) the STA381BW implements an rms-based zero-detect function (on serial input interface data) able to detect in a very reliable way the presence of an input signal, so that the power bridge outputs can be automatically connected to ground. when active, the function will mute the output pwm when th e input level become less than ?threshold - hysteresis?. once muted, the pwm will be unmuted when the input level is detected greater than ?threshold + hysteresis?. the measured level is then reported (for each input channel) on registers 0x51 - 0x52, 0x53 - 0x54 according to the following equation: value_in_db = 20*log 10 (reg_value/(2 16 *0.635)) d7 d6 d5 d4 d3 d2 d1 d0 wthh wthl fineth hsel[1:0] zmth[2:0] 00000111 d7 d6 d5 d4 d3 d2 d1 d0 rms_ch0[7:0] n/a n/a n/a n/a n/a n/a n/a n/a d7 d6 d5 d4 d3 d2 d1 d0 rms_ch0[15:8] n/a n/a n/a n/a n/a n/a n/a n/a d7 d6 d5 d4 d3 d2 d1 d0 rms_ch1[7:0] n/a n/a n/a n/a n/a n/a n/a n/a d7 d6 d5 d4 d3 d2 d1 d0 rms_ch1[15:8] n/a n/a n/a n/a n/a n/a n/a n/a
register description: sound terminal compatibility STA381BW 156/171 doc id 018835 rev 7 the above thresholds and hysteresis table can be overridden and the low-level threshold and high-level threshold can be set by the mth[21:0] bits. to activate the manual thresholds the fineth bit has to be set to ?1?. to configure the low threshold, the wthl bit must be set to ?1? so that any write operation to the mth bits will set the low threshold. to configure the low threshold, the wthh bit must be set to ?1? so that any write operation to the mth bits will set the low threshold. if the zero-mute block does not detect mute, it will mute the output when the current rms value falls below the low threshold. if the zero-mute block does not detect mute, it will unmute the output when the current rms value rises above the high threshold. table 172. zero-detect threshold zmth[2:0] equivalen t input level (db) 000 -78 001 -84 010 -90 011 -96 100 -102 101 -108 110 -114 111 -114 table 173. zero-detect hysteresis hsel[1:0] equivalent input level hysteresis (db) 00 3 01 4 10 5 11 6
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 157/171 table 174. manual threshold register 0x2e, 0x2f and 0x5e 7.25 headphone/line out configur ation register (address 0x55) d7 d6 d5 d4 d3 d2 d1 d0 reservedt reserved mth[21:16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 mth[15:8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 mth[7:0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 hpln reserved mute reserved cpfen cpok abfault dcrok 00100nanana table 175. headphone/line out configuration bits bit r/w rst name description 7r/w 0 hpln when f3x is connected to the internal hp/line driver this bit selects the gain of the f3x->analog out path. ?0?: hp out. when the mvol+channel vol is 0 dbfs, a 0 dbfs input will generat e a 40 mw output on a 32 ohm load (+/- 3.3 v supply). ?1?:line out. when the mvol+channel vol is 0 dbfs, a 0 dbfs input will generate a 2 vrms output (+/- 3.3 v supply) 5r/w 1 mute ?1?: hp/line out muted ?0?: hp/line out playing 3 r/w 0 cpfen ?0?: charge pump auto enable when unmute ?1?: charge pump is always enabled 2 r na cpok ?0?: charge pump is not working ?1?: charge pump is working and it is ok 1 r na abfault ?0?: no fault on class-ab ?1?: overcurrent fault detected on class-ab 0 r na dcrok ?1?: core supply ok
register description: sound terminal compatibility STA381BW 158/171 doc id 018835 rev 7 7.26 f3xcfg (address 0x58; 0x59) d7 d6 d5 d4 d3 d2 d1 d0 f3xlnk reserved reserved reserved reserved reserved reserved reserved 00000000 d7 d6 d5 d4 d3 d2 d1 d0 f3x_fault reserved reserved f3x_sm_slope f3x_mute f3x_ena na1101110 table 176. f3x configuration register 1 bit r/w rst name description 7r/w 0 f3xlnk ?0?: f3x normal control mode ?1?: f3x mute/unmute linked to hp/line mute table 177. f3x configuration register 2 bit r/w rst name description 7 r na f3x_fault ?0?: normal operation 4r/w 0 f3x_sm_slope ?000?: 0 ms ?001?: 25 ms ?010?: 50 ms ?011?: 100 ms ?100?: 200 ms ?101?: 250 ms ?110?: 500 ms ?111?: 1000 ms 3r/w 1 2r/w 1 1 r/w 1 f3x_mute ?1?: mute 0 r/w 0 f3x_ena ?1?: f3x enable
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 159/171 7.27 stcompressor tm configuration regist er (address 0x5a; 0x5b) d7 d6 d5 d4 d3 d2 d1 d0 reserved lim_byp stc_byp stc_ena reserved np_cres reserved np_crc-go 00110000 d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserv ed reserved reserved stc_lnk brc_en 00000000 table 178. stcompressor tm configuration bits1 bit r/w rst name description 6 r/w 0 lim_byp ? 0?: stcompressor tm drc active ?1?: stcompressor tm drc is bypassed 5 r/w 1 stc_byp ?0?: stcompressor tm processing activated ?1?: stcompressor tm is in pass-through 4r/w 1 stc_en ?0?: stcompressor tm is switched off (no configuration is possible in this state) ?1?: stcompressor tm is enabled 2 r 0 np_crcres ?1?: crc stcompressor ok ?0?: crc stcompressor error 0 r/w 0 np_crc_go ?1?: start crc stcompressor compute on ?0?: idle table 179. stcompressor tm configuration bits 2 bit r/w rst name description 1 r/w 0 stc_lnk ?0?: channel 0 and channel 1 attenuation are applied indepenently ?1?: channel 0 and channel 1 attenuation are linked so that the higher one is applied to both channel 0 and channel 1 0 r/w 0 brc_en ?1?: stcompressor band recombination enabled ?0?: disabled
register description: sound terminal compatibility STA381BW 160/171 doc id 018835 rev 7 7.28 charge pump synchronization (address 0x5f) table 180. charge pump sync configuration bits the charge pump can be synchronized with the pwm frame in order to minimize the crosstalk between the charge pump and the pwm waveform. this functionality cannot be activated when the pwms bit (address 0x15 bit d4) is set to 1. d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved chpi initcnt[3:0] chprd 00011001 bit r/w rst name description 5 r/w 0 chpi 0: charge pump phase: 0 deg 1: charge pump phase: 180 deg 4r/w 1 initcnt[3:0] change charge pump phase at one clock step 3r/w 1 2r/w 0 1r/w 0 0 r/w 1 chprd 0: charge pump synchronized with pwm frame 0: charge pump not synchronized with pwm frame
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 161/171 7.29 coefficient ram crc prot ection (address 0x60-0x6c) d7 d6 d5 d4 d3 d2 d1 d0 bqcke[7] bqcke[6] bqcke[5] bqcke[4] bqcke[3] bqcke[2] bqcke[1] bqcke[0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqcke[15] bqcke[14] bqcke[13] bqcke[12] bqcke[11] bqcke[10] bqcke[9] bqcke[8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqcke[23] bqcke[22] bqcke[21] bqcke[20] bqcke[19] bqcke[18] bqcke[17] bqcke[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xccke[7] xccke[6] xccke[5] xccke[4] xccke[3] xccke[2] xccke[1] xccke[0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xccke[15] xccke[14] xccke[13] xccke[12] x ccke[11] xccke[10] xccke[9] xccke[8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xccke[23] xccke[22] xccke[21] xccke[20] x ccke[19] xccke[18] xccke[17] xccke[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqckr[7] bqckr[6] bqckr[5] bqckr[4] bqckr[3] bqckr[2] bqckr[1] bqckr[0] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqckr[15] bqckr[14] bqckr[13] bqckr[12] bqckr[11] bqckr[10] bqckr[9] bqckr[8] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 bqckr[23] bqckr[22] bqckr[21] bqckr[20] bqckr[19] bqckr[18] bqckr[17] bqckr[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcckr[23] xcckr[22] xcckr[21] xcckr[20] x cckr[19] xcckr[18] xcckr[17] xcckr[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcckr[23] xcckr[22] xcckr[21] xcckr[20] x cckr[19] xcckr[18] xcckr[17] xcckr[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcckr[23] xcckr[22] xcckr[21] xcckr[20] x cckr[19] xcckr[18] xcckr[17] xcckr[16] 00000000 d7 d6 d5 d4 d3 d2 d1 d0 xcauto xcres xccmp xcgo bcauto bccres bccmp bccgo 00000000
register description: sound terminal compatibility STA381BW 162/171 doc id 018835 rev 7 the STA381BW implements an automatic crc computat ion for the biquad and mdrc/xover coefficient memory. memory cell contents from address 0x00 to 0x27 will be bit xored to obtain the bqchke checksum, while cells from 0x28 to 0x31 will be xored to obtain the xcchke checksum. both checksums (24-bit wide) are exported on i 2 c registers from 0x60 to 0x65. the checksum computation will start as soon as the bcgo (for biquad ram bank) or the xcgo bit (for mdrc/xover co efficients) is set to 1. the checksum is computed at the processing sample rate if the ir bits equal ?01? or ?10?, otherwise the checksum is computed to half the processing sample rate. when bccmp or xccmp are set to ?1?, the relative checksum (bqchke and xcchke) is continuously compared with bqchkr and xcchk r respectively. if the checksum matches its own reference value, the respective result bits (bcres and xcres) will be set to ?0?. the compare bits have no effect if the respective go bit is not set. in case of checksum errors (i.e. the internally computed didn?t match the reference), an automatic device reset action can be activated. this function is enabled when the bcauto or xcauto bit is set to ?1?. the automatic reset bits have no effect if the respective compare bits are not set. the recommended procedure for the automatic reset activation is the following: download the set of coefficients (ram locations 0x00?0x27) download the externally computed biquad checksum into registers bqchkr enable the checksum of the biquad coefficients by setting the bcgo bit. the checksum will start to be automatically co mputed by the STA381BW and its value exposed on registers bqchecke. the checksum value is computed and updated. enable the checksum comparison by setting the bccmp bit. the internally computed checksum will start to be compared with th e reference one and the result will be exposed on the bcres bit. the following operation will be executed on each audio frame: if (( bqchke == bqchkr )) { bc_res = 0;// checksum is ok, reset the error bit } else { bc_res = 1;// checksum error detected, set the error bit } wait until the bcres bit goes to 0, meaning that the checksum result bit has started to be updated and everythi ng is ok. time-out of this op eration (e.g. > 1 ms) will indicate checksum failure, and the mcu will handle this event. enable automatic reset of the device in case of checksum error by setting the bcauto bit. the bcres bit will then be automatically checked by the STA381BW, on each audio frame, and the reset ev ent will be triggered in ca se of checksum mismatch. periodically check the bc_res status. a value of 1 indicates that a checksum mismatch has occurred and, therefore, the device went through a reset cycle. the previous example is intended for biquad crc bank calculation, but it can be easily extended to mdrc/xo ver crc computation.
STA381BW register description: sound terminal compatibility doc id 018835 rev 7 163/171 7.30 misc3 (address 0x6e) after sreset is written, the la st ic acknowledge is skipped and the eapd bit (reg 0x16 bit d7) is set to1 instead of the 0 default value obtained after the hardware reset. 7.31 misc4 (address 0x7e) d7 d6 d5 d4 d3 d2 d1 d0 reserved reserved reserved reserved reserved sreset reserved reserved 00000000 table 181. misc register 3 bit r/w rst name description 2 r/w 0 sreset ?0?: normal operation ?1?: reset the device d7 d6 d5 d4 d3 d2 d1 d0 smap reserved reserved reserved re served reserved reserved reserved 10000000 table 182. misc4 bit r/w rst name description 71smap ?1?: newmap ?0?: stmap
applications STA381BW 164/171 doc id 018835 rev 7 8 applications 8.1 application schemes the following figures illustrate typical app lication schemes for the STA381BW. the line/headphone out can be fed either with an external analog source ( figure 44 ), or with the f3x output, allowing to have the audio content coming from the digital interface on both the power output and on the line/headphone out ( figure 45 ). regardless of the lineinx pins input, the f3xx outputs can be connected to an external amp lifier as an auxiliary analog output ( figure 46 ). the f3x audio content is provided by the device digital audio interface. figure 44. external audio source to line/headphone out application scheme note: for further information, please refer to application note an3959, 2.0-channel demonstration board based on the STA381BW and STA381BWs.
STA381BW applications doc id 018835 rev 7 165/171 figure 45. f3x (from sai) source to line/headphone out application scheme note: for further information, please refer to application note an3959, 2.0-channel demonstration board based on the STA381BW and STA381BWs.
applications STA381BW 166/171 doc id 018835 rev 7 figure 46. f3x auxiliary analog output note: for further information, please refer to application note an3959, 2.0-channel demonstration board based on the STA381BW and STA381BWs. 8.2 headphone and 2 vrms line out figure 47. headphone and line out block diagram note: for further information, please refer to application note an3959, 2.0-channel demonstration board based on the STA381BW and STA381BWs.
STA381BW applications doc id 018835 rev 7 167/171 besides the digital input to the power output path, a line in to the headphone / 2vrms line out path is provided. the headphone and line out block diagram is shown in figure 47 . the overall gain is determined by the external resistors r1 and r2 as: gain=r2/r1*2 the lineinr/lineinl pins can be either connected to an external line in or to the f3xl/f3xr pins as depicted in figure 44 and figure 45 . thanks to this latter option it is possible to route the digital input (sai) content on both the power and the line out/headphone output. note: the charge pump of the headphone and line out cannot drive a purely capacitive load. please refer to an3959 (2.0-channel demonstration board based on the STA381BW and STA381BWs) for detailed information about headphone and line out filtering. 8.3 typical output configuration figure 48 illustrates the typical output configuration used for btl stereo mode. please refer to the application note for all the other schematics for the recommended output configuration. figure 48. output configuration for stereo btl mode in filterlight configuration note: for further information, please refer to application note an3959, 2.0-channel demonstration board based on the STA381BW and STA381BWs.
package information STA381BW 168/171 doc id 018835 rev 7 9 package information in order to meet environmental requirements, st offers these devices in different grades of ecopack ? packages, depending on their level of environmental compliance. ecopack ? specifications, grade definitions and product status are available at: www.st.com . ecopack ? is an st trademark. figure 49. vqfn48 (7 x 7 x 0.9 mm) package outline 83 20060_wk
STA381BW package information doc id 018835 rev 7 169/171 table 183. vqfn48 (7 x 7 x 0.9 mm) package dimensions reference mm min. typ. max a 0.80 0.90 1.00 a1 0 0.05 d 6.90 7.00 7.10 d2 5.65 5.70 5.75 e 6.90 7.00 7.10 e2 5.65 5.70 5.75 b 0.25 0.30 0.35 b1 0.20 0.25 0.30 e (pad pitch) 0.50 l1 0.05 0.15 aaa 0.15 bbb 0.10 ddd 0.05 eee 0.08 fff 0.10 ccc 0.10
revision history STA381BW 170/171 doc id 018835 rev 7 10 revision history table 184. document revision history date revision changes 08-jun-2011 1 initial release 28-jun-2011 2 removed tqfp64 package option 02-sep-2011 3 added note to figure 44 , 45 , 46 , 47 , 48 , and section 8.2: headphone and 2 vrms line out , referencing an3959 20-dec-2011 4 updated names of pin 32 and 33 in figure 1: block diagram , figure 2: pin connections vqfn48 (top view) and table 2: pin list document promoted from preliminary to full datasheet 17-jan-2012 5 added ?vdd3v3chp? to ta b l e 3 and ta bl e 5 updated footnotes in ta bl e 7 updated register names to ?svup? and ?svdn? for addresses 37 and 38 in ta b l e 1 0 0 updated text in ta b l e 4 6 and table 121: pwm speed mode updated 2.0 channels, two full-bridges (ocfg = 00) on page 118 updated 2.1 channels, two full-bridges + one external full-bridge (ocfg = 10) on page 120 updated high-pass filter in table 152 textual changes to formulas in section 7.17: eq soft volume configuration registers (addr 0x37 - 0x38) 20-jun-2012 6 added overvoltage protection threshold (v ov ) to table 7: electrical specifications - power section 03-aug-2012 7 removed ecle bit and sections concerni ng ?auto eapd on clock loss? from datasheet updated table 14: default register map table: new map on page 42 updated ta b l e 1 0 0 : i 2 c registers summary on page 103 updated section 6.32: enhanced zero-detect mute and input level measurement (address 0x61-0x65, 0x3f, 0x40, 0x6f) on page 94 added table 90: manual threshold register 0x3f, 0x40 and 0x6f on page 95 added section 6.36: charge pump synchronization (address 0x70) on page 98 added table 98: charge pump sync configuration bits on page 98 updated section 7.24: enhanced zero-detect mute and input level measurement (address 0x50-0x54, 0x2e, 0x2f and 0x5e) on page 155 added table 174: manual threshold register 0x2e, 0x2f and 0x5e on page 157 added section 7.28: charge pump synchronization (address 0x5f) on page 160 added table 180: charge pump sync configuration bits on page 160
STA381BW doc id 018835 rev 7 171/171 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by two authorized st representatives, st products are not recommended, authorized or warranted for use in milita ry, air craft, space, life saving, or life sustaining applications, nor in products or systems where failure or malfunction may result in personal injury, death, or severe property or environmental damage. st products which are not specified as "automotive grade" may only be used in automotive applications at user?s own risk. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2012 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of STA381BW

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X